Q. Point out the correct statement?

  • (A) Using factors with labels is better than using integers because factors are self-describing
  • (B) Factors are used to represent categorical data and can be unordered or ordered
  • (C) Factors are important in statistical modeling and are treated specially by modelling functions like lm() and glm()
  • (D) All of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the mentioned

Q. Density function gives output as . . . . . . . .

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

Q. Which of the following code snippet will create a vector with NAs in it?

  • (A) x >- c(1, 2, NA, 10, 3)
  • (B) x >- cNA(1, 2, NA, 10, 3)
  • (C) x >- NA(1, 2, NA, 10, 3)
  • (D) x >- NA(1, 5, NA, 10, 8)
πŸ’¬ Discuss
βœ… Correct Answer: (A) x >- c(1, 2, NA, 10, 3)

Q. What is the simplest way of creating the vector?

  • (A) C function
  • (B) Create
  • (C) Destroy
  • (D) Invalid
πŸ’¬ Discuss
βœ… Correct Answer: (A) C function

Q. . . . . . . . . provides optional labels with the columns and rows.

  • (A) Disnames
  • (B) Dimnames
  • (C) Denmes
  • (D) Demnesd
πŸ’¬ Discuss
βœ… Correct Answer: (B) Dimnames

Q. Point out the correct statement?

  • (A) Empty vectors can be created with the vector() function
  • (B) A sequence is represented as a vector but can contain objects of different classes
  • (C) "raw" objects are commonly used directly in data analysis
  • (D) The value NaN represents undefined value
πŸ’¬ Discuss
βœ… Correct Answer: (A) Empty vectors can be created with the vector() function

Q. What will be the output of the following R code?
> x <- c(1, 2, NaN, NA, 4)
> is.na(x)

  • (A) FALSE FALSE TRUE TRUE FALSE
  • (B) FALSE TRUE TRUE TRUE FALSE
  • (C) TRUE FALSE TRUE TRUE FALSE
  • (D) TRUE FALSE TRUE FALSE FALSE
πŸ’¬ Discuss
βœ… Correct Answer: (A) FALSE FALSE TRUE TRUE FALSE

Q. Accessing elements is achieved through a process called . . . . . . . .

  • (A) Indexing
  • (B) Outdexing
  • (C) Highlighting
  • (D) Scrapping
πŸ’¬ Discuss
βœ… Correct Answer: (A) Indexing

Q. A . . . . . . . . is an R-object which can contain many different types of elements inside it.

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

Q. Data frames can be converted to a matrix by calling data . . . . . . . .

  • (A) as.matr()
  • (B) as.mat()
  • (C) as.matrix()
  • (D) as.max()
πŸ’¬ Discuss
βœ… Correct Answer: (C) as.matrix()