R Programming MCQs with answers Page - 118

Here, you will find a collection of MCQ questions on R Programming. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

Q. Unlike writing out a table or CSV file, dump() and dput() preserve the . . . . . . . . so that another user doesn't have to specify the all over again.

  • (A) metadata
  • (B) backup data
  • (C) attribute data
  • (D) normal data

A

Admin • 833.24K Points
Coach

Q. Which of the following R code creates a connection to 'foo.txt'?

  • (A) con <- file("foo.txt")
  • (B) open(con, "r")
  • (C) opencon(con, "r")
  • (D) ocon(con, "r")

A

Admin • 833.24K Points
Coach

Q. R code can be tested using . . . . . . . . package.

  • (A) Dplyr
  • (B) Hadley's testthat
  • (C) SKLearn
  • (D) KNN

A

Admin • 833.24K Points
Coach

Q. Point out the correct statement?

  • (A) POSIX represents a portable operating system interface, primarily for UNIX systems
  • (B) There are different levels of indication that can be used, ranging from mere notification to fatal error
  • (C) The default input format for POSIX dates consists of the month, followed by the year and day, separated by slashes or dashes
  • (D) R don't have any way to indicate to you that something's not right

A

Admin • 833.24K Points
Coach

Q. . . . . . . . . function can be used to select the random sample of size 'n' from a huge dataset.

  • (A) Simple()
  • (B) Sample()
  • (C) While()
  • (D) Signal()

A

Admin • 833.24K Points
Coach

Q. What will be the output of the following R code?
> g <- function(x) {
+ a <- 3
+ x+a+y
+ ## 'y' is a free variable
+ }
> y <- 3
> g(2)

  • (A) 9
  • (B) 42
  • (C) 8
  • (D) Error

A

Admin • 833.24K Points
Coach

Q. What will be the output of the following R code snippet?
> g <- function(x) {
+ a <- 3
+ x+a+y
+ ## 'y' is a free variable
+ }
> g(2)

  • (A) 9
  • (B) 42
  • (C) 8
  • (D) Error

A

Admin • 833.24K Points
Coach

Q. What will be the output of the following R code?
> mean(x)
Error in mean(x) : object 'x' not found
> traceback()

  • (A) 1: mean(x)
  • (B) Null
  • (C) 0
  • (D) 2

A

Admin • 833.24K Points
Coach

Q. Point out the correct statement?

  • (A) The search list can be found by using the searchlist() function
  • (B) The search list can be found by using the search() function
  • (C) The global environment or the user's workspace is always the second element of the search list
  • (D) R has separate namespaces for functions and non-functions

A

Admin • 833.24K Points
Coach

Q. Point out the wrong statement?

  • (A) Statements cannot be grouped together using braces '{' and '}'
  • (B) Computation in R consists of sequentially evaluating statements
  • (C) Single statements are evaluated when a new line is typed at the end of the syntactically complete statement
  • (D) next is used to skip an iteration of a loop

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ