a) con < - file(“foo.txt”) b) open(con, “r”) c) opencon(con, “r”) d) ocon(con, “r”) Answer: a Explanation: ...
View QuestionConnections to text files can be created with the ________ function.
a) url b) gzfile c) bzfile d) file Answer: d Explanation: The file() function has a number ...
View Question________ opens a connection to a file compressed with gzip.
a) url b) gzfile c) bzfile d) file Answer: b Explanation: “file” opens a connection to a ...
View QuestionPoint out the wrong statement?
a) When you call unserialize() on an R object, the output will be a raw vector coded in ...
View QuestionWhich of the following statement will load the objects to the file named “mydata.RData”?
a) save(“mydata.RData”) b) load(“mydata.RData”) c) loadAll(“mydata.RData”) d) put(“mydata.RData”) Answer: b Explanation: rda and .RData are fairly common ...
View Question
Which of the following R statement will save the output to the file for following R code?
> a < – data.frame(x = rnorm(100), y = runif(100))
> b < – c(3, 4.4, 1 / 3)
Which of the following R statement will save the output to the file for following R code? > ...
View QuestionPoint out the correct statement?
a) The complement to the textual format is the binary format b) If you have a lot of ...
View QuestionIndividual R objects can be saved to a file using the _____ function.
a) save b) put c) save_image d) get Answer: a Explanation: The key functions for converting R ...
View QuestionWhich 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 ...
View QuestionWhich of the following function is identical to read .table?
a) read.csv b) read.data c) read.tab d) read.del Answer: a Explanation: The read.csv() function is identical to ...
View Question