Q. Which function replicates elements of vectors?

  • (A) C
  • (B) Rep
  • (C) Crep
  • (D) Grep
πŸ’¬ Discuss
βœ… Correct Answer: (B) Rep

Q. Which of the following statement changes column name to h and f?

  • (A) colnames(m) <- c("h", "f")
  • (B) columnnames(m) <- c("h", "f")
  • (C) rownames(m) <- c("h", "f")
  • (D) rownames(m) <- c("f", "f")
πŸ’¬ Discuss
βœ… Correct Answer: (A) colnames(m) <- c("h", "f")

Q. Which of the following is a 3-dimensional dataset?

  • (A) Eris
  • (B) Iris
  • (C) Toris
  • (D) Iris
πŸ’¬ Discuss
βœ… Correct Answer: (B) Iris

Q. What will be the output of the following R code?
> sqrt(-17)

  • (A) -4.02
  • (B) 4.02
  • (C) NaN
  • (D) 3.67
πŸ’¬ Discuss
βœ… Correct Answer: (C) NaN

Q. What will be the output of the following R code?
> x <- 1:3
> y <- 10:12
> cbind(x, y)

  • (A) x y [1,] 6 10 [2,] 7 11 [3,] 8 12
  • (B) x y [1,] 1 10 [2,] 2 11 [3,] 3 12
  • (C) x y [1,] 1 4 [2,] 2 5 [3,] 3 6
  • (D) x y [1,] 1 6 [2,] 2 5 [3,] 3 10
πŸ’¬ Discuss
βœ… Correct Answer: (B) x y [1,] 1 10 [2,] 2 11 [3,] 3 12

Q. Which of the following statement is invalid?

  • (A) x <- c(1+0i, 2+4i)
  • (B) x <- c(TRUE, FALSE)
  • (C) x <- c(T, F)
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (D) None of the mentioned

Q. Which of the following code constructs vector of length 11?

  • (A) > v <- 3*x + y + 1
  • (B) > v <- 3*x + y + 2
  • (C) > v <- 2*x + y + 1
  • (D) > v <- 2*x + y + 4
πŸ’¬ Discuss
βœ… Correct Answer: (C) > v <- 2*x + y + 1

Q. How can we access the first component of the list?

  • (A) Number of the position
  • (B) Function
  • (C) Package
  • (D) Tools
πŸ’¬ Discuss
βœ… Correct Answer: (A) Number of the position

Q. An ordered collection of objects or components are called . . . . . . . .

  • (A) Data frames
  • (B) Datasets
  • (C) Databases
  • (D) Lists
πŸ’¬ Discuss
βœ… Correct Answer: (D) Lists

Q. The . . . . . . . . function returns a list of densities (y) corresponding to bin values (x).

  • (A) Spline
  • (B) Density
  • (C) Lists
  • (D) Locator
πŸ’¬ Discuss
βœ… Correct Answer: (A) Spline