Formats, Objects and Operations- Multiple Choice Questions

Que.Which of the following is used for reading in saved workspaces?
a. unserialize
b. load
c. get
d. set
Que.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
Que.________ is used for outputting a textual representation of an R object.
a. dput
b. dump
c. dget
d. dset
Que.Which of the following argument denotes if the file has a header line?
a. header
b. sep
c. file
d. footer
Que.Point out the correct statement?
a. unserialize is used for converting an R object into a binary format for outputting to a connection
b. save is used for saving an arbitrary number of R objects in binary format to a file
c. The read.data() function is one of the most commonly used functions for reading data
d. save is not used for saving an arbitrary
Que.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”)
Que.Which of the following function is identical to read .table?
a. read.csv
b. read.data
c. read.tab
d. read.del
Que.Which of the following code would read 100 rows?
a. initial <- read.table(“datatable.txt”, nrows = 100)
b. tabAll <- read.table(“datatable.txt”, colClasses = classes)
c. initial <- read.table(“datatable.txt”, nrows = 99)
d. initial <- read.table(“datatable.txt”, nrows = 101)
Que.What will be the output of the following R code?
> y <- data.frame(a = 1, b = "a")
> dput(y)

a. structure(list(a = 1, b = list(1L, .Label = “a”, class = “factor”)), .Names= c(“a”,”b”), row.names = c(NA, -1L), class = “data.frame”)
b. list(list(a = 1, b = list(1L, .Label = “a”, class = “factor”)), .Names= c(“a”,”b”), row.names = c(NA, -1L), class = “data.frame”)
c. structure(list(a = 1, b = structure(1L, .Label = “a”, class = “factor”)), .Names= c(“a”,”b”), row.names = c(NA, -1L), class = “data.frame”)
d. Error
Que.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 b1 1 a
b. a b1 2 b
c. a b2 1 a
d. b a1 a a