Q. What are the data types in R on which binary operators can be applied?

  • (A) Scalars
  • (B) Matrices
  • (C) Vectors
  • (D) Scalars, Matrices and Vectors
πŸ’¬ Discuss
βœ… Correct Answer: (D) Scalars, Matrices and Vectors

Q. Point out the correct statement?

  • (A) split() takes elements of the list and passes them as the first argument of the function you are applying
  • (B) You can use tsplit() to evaluate a function single time each with a same argument
  • (C) Sequence of operations is sometimes referred to as "map-reduce"
  • (D) apply() can be thought of as a combination of split() and sapply() for vectors only
πŸ’¬ Discuss
βœ… Correct Answer: (C) Sequence of operations is sometimes referred to as "map-reduce"

Q. . . . . . . . . function is used for reading the .csv file in R language.

  • (A) Write.csv()
  • (B) Read.csv ()
  • (C) Let.csv()
  • (D) Table.csv()
πŸ’¬ Discuss
βœ… Correct Answer: (B) Read.csv ()

Q. If a programmer wants the output to be a list then . . . . . . . . function is used.

  • (A) Lapply
  • (B) Sapply
  • (C) Vapply
  • (D) Zapply
πŸ’¬ Discuss
βœ… Correct Answer: (B) Sapply

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

  • (A) Dplyr
  • (B) Hadley's testthat
  • (C) SKLearn
  • (D) KNN
πŸ’¬ Discuss
βœ… Correct Answer: (B) Hadley's testthat

Q. Point out the correct statement?

  • (A) The only way to exit a repeat loop is to call break
  • (B) Infinite loops should generally be avoided
  • (C) Control structures like if, while, and for allow you to control the flow of an R program
  • (D) All of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the mentioned

Q. Which of the following statement can be used to explicitly control looping?

  • (A) if
  • (B) while
  • (C) break
  • (D) for
πŸ’¬ Discuss
βœ… Correct Answer: (C) break

Q. . . . . . . . . prints out the function call stack after an error occurs.

  • (A) trace()
  • (B) traceback()
  • (C) back()
  • (D) traback()
πŸ’¬ Discuss
βœ… Correct Answer: (B) traceback()

Q. . . . . . . . . allows you to insert debugging code into a function a specific places

  • (A) debug()
  • (B) trace()
  • (C) browser()
  • (D) traceback()
πŸ’¬ Discuss
βœ… Correct Answer: (B) trace()

Q. What will be the output of log (-5.8) when executed on R console?

  • (A) NAN
  • (B) NA
  • (C) Error
  • (D) 0.213
πŸ’¬ Discuss
βœ… Correct Answer: (A) NAN