Q. What is the mode of 'a' in the following R code?
a <- c(1,” a”, FALSE)

  • (A) Numeric
  • (B) Character
  • (C) Integer
  • (D) Logical
πŸ’¬ Discuss
βœ… Correct Answer: (B) Character

Q. . . . . . . . . provides a point-and-click interface to many basic statistic problems.

  • (A) Commander
  • (B) GUI
  • (C) Console
  • (D) Terminal
πŸ’¬ Discuss
βœ… Correct Answer: (A) Commander

Q. What will be the output of the following R function?
paste("Everybody", "is", “a” , "warrior")

  • (A) "Everybody", "is", "a" , "warrior"
  • (B) Everybody is a warrior
  • (C) Everybody", "is", "a" , "warrior
  • (D) "Everybody is a warrior"
πŸ’¬ Discuss
βœ… Correct Answer: (D) "Everybody is a warrior"

Q. How to install for a package and all of the other packages on which for depends?

  • (A) install.packages (for, depends = TRUE)
  • (B) R.install.packages ("for", depends = TRUE)
  • (C) install.packages ("for", depends = TRUE)
  • (D) install ("for", depends = FALSE)
πŸ’¬ Discuss
βœ… Correct Answer: (C) install.packages ("for", depends = TRUE)

Q. . . . . . . . . function is used to watch for all available packages in library.

  • (A) lib()
  • (B) fun.lib()
  • (C) libr()
  • (D) library()
πŸ’¬ Discuss
βœ… Correct Answer: (D) library()

Q. How is a list created in R?

  • (A) list(a = 1, b = "hello", c = TRUE)
  • (B) c(1, "hello", TRUE)
  • (C) data.frame(a = 1, b = "hello", c = TRUE)
  • (D) matrix(c(1, "hello", TRUE), nrow = 1)
πŸ’¬ Discuss
βœ… Correct Answer: (A) list(a = 1, b = "hello", c = TRUE)

Q. What does the R function median() compute?

  • (A) Median of a numeric vector
  • (B) Mean of a numeric vector
  • (C) Standard deviation of a numeric vector
  • (D) Sum of a numeric vector
πŸ’¬ Discuss
βœ… Correct Answer: (A) Median of a numeric vector

Q. How do you install a package in R from the CRAN repository using the install.packages() function?

  • (A) install.packages("package_name")
  • (B) install.package("package_name")
  • (C) install_cran_package("package_name")
  • (D) add.package("package_name")
πŸ’¬ Discuss
βœ… Correct Answer: (A) install.packages("package_name")

Q. In R, how do you access the help documentation for a specific function, e.g., mean()?

  • (A) help(mean)
  • (B) ?mean
  • (C) info(mean)
  • (D) get.help(mean)
πŸ’¬ Discuss
βœ… Correct Answer: (B) ?mean

Q. What does the lengths() function do in R?

  • (A) Returns the number of elements in each list element
  • (B) Computes the lengths of strings in a character vector
  • (C) Calculates the length of a numeric vector
  • (D) Counts the number of elements in a list
πŸ’¬ Discuss
βœ… Correct Answer: (A) Returns the number of elements in each list element