R Programming Quiz Questions and Answers

Which Package contains most fundamental functions to run R?

Answer :
  • base

What is the output of getOption(“defaultPackages”) in R studio?

Answer :
  • Shows default packages in R

Advanced users can write ___ code to manipulate R objects directly.

Answer :
  • C, C++

The four most frequently used types of data objects in R are vectors, matrices, data frames and ________.

Answer :
  • Lists

What will be the output of the following R code? X <- 1 print(x)

Answer :
  • 1

If the code is stored in the external file, which of the following function is used to call them to a working directory?

Answer :
  • source()

What is the meaning of the following R function? print( sqrt(2) )

Answer :
  • 1.414214

What will be the output of the following R function? d <- diag(5, nrow=2, ncol=2) d

Answer :
  • 5 0 0 5

A _________ is a two-dimensional rectangular data set.

Answer :
  • Matrix

A data frame is a special type of list where every element of the list has ______ length.

Answer :
  • Same