Q. Which function gives the list as output?

  • (A) Spline
  • (B) Matrix
  • (C) Vector
  • (D) Alphabet
πŸ’¬ Discuss
βœ… Correct Answer: (A) Spline

Q. Which of the following is valid assignment?

  • (A) > x <- fact(c("yes", "yes", "no", "yes", "no"))
  • (B) > x <- factor(c("yes", "yes", "no", "yes", "no"))
  • (C) > x <- factor(factor("yes", "yes", "no", "yes", "no"))
  • (D) > x <- factor(factor("yes", "no", "no", "yes", "no"))
πŸ’¬ Discuss
βœ… Correct Answer: (B) > x <- factor(c("yes", "yes", "no", "yes", "no"))

Q. Which of the following is a valid assignment?

  • (A) > m <- matrix(nrow = 2, ncol = 3)
  • (B) > m <- matrix(nrow = 2, ncol = 3.5)
  • (C) > m <- mat(nrow = 2, ncol = 3)
  • (D) > m <- mat(nrow = 2, ncol = 5)
πŸ’¬ Discuss
βœ… Correct Answer: (A) > m <- matrix(nrow = 2, ncol = 3)

Q. Which of the following is used for generating sequences?

  • (A) seq()
  • (B) sequence()
  • (C) order()
  • (D) orderasc()
πŸ’¬ Discuss
βœ… Correct Answer: (A) seq()

Q. Point out the correct statement?

  • (A) Use explicit TRUE and FALSE values when indicating logical values
  • (B) rm command is used to remove objects in R
  • (C) R operates on named data structures
  • (D) All of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the mentioned

Q. Factors are the r-objects which are created using a . . . . . . . .

  • (A) Vector
  • (B) Matrix
  • (C) Lists
  • (D) Array
πŸ’¬ Discuss
βœ… Correct Answer: (A) Vector

Q. Which function can be used to determine the names assigned to a list?

  • (A) Names
  • (B) Name
  • (C) Nam
  • (D) Nem
πŸ’¬ Discuss
βœ… Correct Answer: (A) Names

Q. The length of a list is . . . . . . . . to the number of components in that list.

  • (A) Double
  • (B) Equal
  • (C) Triple
  • (D) One fourth
πŸ’¬ Discuss
βœ… Correct Answer: (B) Equal

Q. What will be the output of the following R code?
> x <- 1:3
> names(x)

  • (A) NULL
  • (B) 1
  • (C) 2
  • (D) 4.5
πŸ’¬ Discuss
βœ… Correct Answer: (A) NULL

Q. Find the following type of vector?
a <- c(1,2,5.3,6,-2,4)

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