Q. What will be the output of the following R code?
> x <- matrix(1:6, 2, 3)
> x[1, , drop = FALSE]

  • (A) [,1] [,2] [,3] [1,] 1 3 5
  • (B) [,1] [,2] [,3] [1,] 2 3 5
  • (C) [,1] [,2] [,3] [1,] 1 2 5
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (A) [,1] [,2] [,3] [1,] 1 3 5

Q. The . . . . . . . . operator allows you to string operations in a left-to-right fashion.

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

Q. Point out the correct statement?

  • (A) The complement to the textual format is the binary format
  • (B) If you have a lot of objects that you want to save to a file, you can save all objects in your workspace using the save.image() function
  • (C) The serialize() function is used to convert individual R objects into a binary format that can be communicated across an arbitrary connection
  • (D) All of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the mentioned

Q. dplyr can be integrated with the . . . . . . . . package for large fast tables.

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

Q. What will be the output of the following R code?
> x <- list(foo = 1:4, bar = 0.6, baz = "hello")
> name <- "foo"
> x$name

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

Q. Point out the wrong statement?

  • (A) When you call unserialize() on an R object, the output will be a raw vector coded in hexadecimal format
  • (B) serialize() function is the only way to perfectly represent an R object in an exportable format
  • (C) .rda extension is used when save() function is incorporated
  • (D) The complement to the textual format is the binary format
πŸ’¬ Discuss
βœ… Correct Answer: (A) When you call unserialize() on an R object, the output will be a raw vector coded in hexadecimal format

Q. . . . . . . . . extract a subset of rows from a dataframe based on logical conditions.

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

Q. Which of the following statement would read file "foo.txt"?

  • (A) data <- read.table("foo.txt")
  • (B) read.data <- read.table("foo.txt")
  • (C) data <- read.data("foo.txt")
  • (D) data <- data("foo.txt")
πŸ’¬ Discuss
βœ… Correct Answer: (A) data <- read.table("foo.txt")

Q. Point out the wrong statement?

  • (A) write.table is used for for writing tabular data to text files (i.e. CSV) or connections
  • (B) writeLines is used for for writing character data line-by-line to a file or connection
  • (C) dump is used for for dumping a textual representation of multiple R objects
  • (D) all of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (D) all of the mentioned

Q. One way to pass data around is by de parsing the R object with . . . . . . . .

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