Computer

Data Structures In R Programming MCQs

Practice Data Structures In R Programming MCQs for competitive exams.

Data Structures In R Programming MCQs

Practice questions from this topic.

What will be the output of the following R code? > x x$a

  1. A. 1 2 3 4 5
  2. B. 2 3 5
  3. C. 1 3 3 5
  4. D. 1 2 3
Report Error

. . . . . . . . generate summary statistics of different variables in the data frame, possibly within strata.

  1. A. rename
  2. B. summarize
  3. C. set
  4. D. subset
Report Error

Which of the following argument denotes if the file has a header line?

  1. A. header
  2. B. sep
  3. C. file
  4. D. footer
Report Error

The dplyr package can be installed from CRAN using . . . . . . . .

  1. A. installall.packages("dplyr")
  2. B. install.packages("dplyr")
  3. C. installed.packages("dplyr")
  4. D. installed.packages("dpl")
Report Error

We can dump() R objects to a file by passing . . . . . . . .

  1. A. character vector of their names
  2. B. object name
  3. C. arguments
  4. D. file name
Report Error

What will be the output of the following R code? > datestring x x

  1. A. "2012-01-10 10:40:00 EST" "2011-12-09 09:10:00 EST"
  2. B. "2012-01-10 10:40:00 IST" "2011-12-09 09:10:00 IST"
  3. C. "2012-01-10 10:40:00 GMT" "2011-12-09 09:10:00 GMT"
  4. D. Error
Report Error

What will be the output of the following R code? > x y y-x

  1. A. Time difference of 1 hour
  2. B. Time difference of 1 min
  3. C. Time difference of 1 sec
  4. D. Time difference of 5 sec
Report Error

Which of the following function gives the day of the week?

  1. A. weekdays
  2. B. months
  3. C. quarters
  4. D. semesters
Report Error

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

  1. A. data <- read.table("foo.txt")
  2. B. read.data <- read.table("foo.txt")
  3. C. data <- read.data("foo.txt")
  4. D. data <- data("foo.txt")
Report Error

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

  1. A. rename
  2. B. filter
  3. C. set
  4. D. subset
Report Error

What will be the output of the following R code? > x name x$name

  1. A. 1
  2. B. 2
  3. C. 3
  4. D. NULL
Report Error

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

  1. A. data.table
  2. B. read.table
  3. C. data.data
  4. D. table.read
Report Error