Q. What will be the output of the following R code?
> x <- 0:6
> as.logical(x)

  • (A) FALSE TRUE TRUE TRUE TRUE TRUE TRUE
  • (B) "0" "1" "2" "3" "4" "5" "6"
  • (C) 0 1 2 3 4 5 6
  • (D) 6 5 5 3 2 1
πŸ’¬ Discuss
βœ… Correct Answer: (A) FALSE TRUE TRUE TRUE TRUE TRUE TRUE

Q. Point out the correct statement?

  • (A) Character strings are entered using either matching double (") or single (') quotes
  • (B) Character vectors may be concatenated into a vector by the c() function
  • (C) Subsets of the elements of a vector may be selected by appending to the name of the vector an index vector in square brackets
  • (D) All of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the mentioned

Q. Which of the following can be considered as object attribute?

  • (A) dimensions
  • (B) class
  • (C) length
  • (D) all of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (D) all of the mentioned

Q. The . . . . . . . . stores the nominal values as a vector of integers in the range of 1 to unique values in the nominal variable.

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

Q. The . . . . . . . . function creates a regular sequence of values to form a vector.

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

Q. Point out the correct statement?

  • (A) rep() is be used for replicating an object in various complicated ways
  • (B) seq() function has four arguments
  • (C) sequence() is a more general facility for generating sequences
  • (D) numerical vectors are generated by conditions
πŸ’¬ Discuss
βœ… Correct Answer: (A) rep() is be used for replicating an object in various complicated ways

Q. In R using the function, . . . . . . . . one can check the data type of vector.

  • (A) Typeof()
  • (B) Castof()
  • (C) Function()
  • (D) C()
πŸ’¬ Discuss
βœ… Correct Answer: (A) Typeof()

Q. Attributes of an object (if any) can be accessed using the . . . . . . . . function.

  • (A) objects()
  • (B) attrib()
  • (C) attributes()
  • (D) obj()
πŸ’¬ Discuss
βœ… Correct Answer: (C) attributes()

Q. . . . . . . . . are similar to matrices but can have more than two dimensions.

  • (A) Functions
  • (B) Packages
  • (C) Arrays
  • (D) Columns
πŸ’¬ Discuss
βœ… Correct Answer: (C) Arrays

Q. The data type of the R-object becomes the data type of the . . . . . . . .

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