Q. Which of the following opens connection to gz-compressed text file?

  • (A) con <- gzfiles("words.gz")
  • (B) con <- gzfile("words.gz")
  • (C) con <- gzfile2("words.gz")
  • (D) con <- gzfiles2("words.gz")
πŸ’¬ Discuss
βœ… Correct Answer: (B) con <- gzfile("words.gz")

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

  • (A) $foo [1] 1 2 3 4 $bar [1] 0.6
  • (B) $foo [1] 0 1 2 3 4 $bar [1] 0 0.6
  • (C) $foo [1] 0 1 2 3 4 $bar [1] 0.6
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (A) $foo [1] 1 2 3 4 $bar [1] 0.6

Q. The . . . . . . . . function can be used to select columns of a data frame that you want to focus on.

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

Q. What will be the output of the following R code?
> x <- list(a = list(10, 12, 14), b = c(3.14, 2.81))
> x[[c(1, 3)]]

  • (A) 13
  • (B) 14
  • (C) 15
  • (D) 18
πŸ’¬ Discuss
βœ… Correct Answer: (B) 14

Q. What will be the output of the following R code?
> p <- as.POSIXlt(x)
> names(unclass(p))
> p$wday

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

Q. There is an SQL interface for relational databases via the . . . . . . . . package.

  • (A) DIB
  • (B) DB2
  • (C) DBI
  • (D) DIB21
πŸ’¬ Discuss
βœ… Correct Answer: (C) DBI

Q. dput() output is in the form of . . . . . . . .

  • (A) R code
  • (B) text file code
  • (C) binary code
  • (D) both binary and text
πŸ’¬ Discuss
βœ… Correct Answer: (A) R code

Q. Unlike writing out a table or CSV file, dump() and dput() preserve the . . . . . . . . so that another user doesn't have to specify the all over again.

  • (A) metadata
  • (B) backup data
  • (C) attribute data
  • (D) normal data
πŸ’¬ Discuss
βœ… Correct Answer: (A) metadata

Q. Which of the following function is similar to summarize?

  • (A) arrange_by()
  • (B) group()
  • (C) group_by()
  • (D) arrange
πŸ’¬ Discuss
βœ… Correct Answer: (C) group_by()

Q. The . . . . . . . . operator is used to connect multiple verb actions together into a pipeline.

  • (A) pipe
  • (B) piper
  • (C) start
  • (D) end
πŸ’¬ Discuss
βœ… Correct Answer: (A) pipe