Q. Which of the following is used for reading tabular data?
> y <- data.frame(a = 1, b = "a")
> dput(y, file = "y.R")
> new.y <- dget("y.R")
> new.y

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

Q. . . . . . . . . is used for outputting a textual representation of an R object.

  • (A) dput
  • (B) dump
  • (C) dget
  • (D) dset
πŸ’¬ Discuss
βœ… Correct Answer: (A) dput

Q. Which of the following function is identical to read .table?

  • (A) read.csv
  • (B) read.data
  • (C) read.tab
  • (D) read.del
πŸ’¬ Discuss
βœ… Correct Answer: (A) read.csv

Q. Point out the correct statement?

  • (A) You can also omit variables using the select() function by using the negative sign
  • (B) The arrange() function also allows a special syntax that allows you to specify variable names based on patterns
  • (C) Reordering rows of a data frame is normally easier to do in R
  • (D) The dplyr package provides any "new" functionality to R
πŸ’¬ Discuss
βœ… Correct Answer: (A) You can also omit variables using the select() function by using the negative sign

Q. What will be the output of the following R code?
> x <- Sys.time()
> class(x)

  • (A) "POSIXct" "POSIXt"
  • (B) "POSIXXt" "POSIXt"
  • (C) "POSIXct" "POSIct"
  • (D) "POSIXt" "POSIXt"
πŸ’¬ Discuss
βœ… Correct Answer: (A) "POSIXct" "POSIXt"

Q. . . . . . . . . function is similar to the existing subset() function in R but is quite a bit faster.

  • (A) rename
  • (B) filter
  • (C) set
  • (D) subset
πŸ’¬ Discuss
βœ… Correct Answer: (B) filter

Q. Which of the following is used for reading in saved workspaces?

  • (A) unserialize
  • (B) load
  • (C) get
  • (D) set
πŸ’¬ Discuss
βœ… Correct Answer: (B) load

Q. What will be the output of the following R code?
> x <- 1:4
> x > 2

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

Q. Which of the following code represents internal representation of a Date object?

  • (A) class(as.Date("1970-01-02"))
  • (B) unclass(as.Date("1970-01-02"))
  • (C) unclassint(as.Date("1970-01-02"))
  • (D) classint(as.Date("1970-02-02"))
πŸ’¬ Discuss
βœ… Correct Answer: (B) unclass(as.Date("1970-01-02"))

Q. Point out the wrong statement?

  • (A) Very less operations in R are vectorized
  • (B) Vectorization allows you to write code that is efficient, concise, and easier to read than in non-vectorized languages
  • (C) vectorized means that operations occur in parallel in certain R objects
  • (D) Matrix operations are also vectorized
πŸ’¬ Discuss
βœ… Correct Answer: (A) Very less operations in R are vectorized