

MCQOPTIONS
Saved Bookmarks
This section includes 5 Mcqs, each offering curated multiple-choice questions to sharpen your R Programming knowledge and support exam preparation. Choose a topic below to get started.
1. |
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") |
Answer» C. con <- gzfile2("words.gz") | |
2. |
Which of the following code opens a connection to the file foo.txt, reads from it, and closes the connection when its done? |
A. | data <- read.csv("foo.txt") |
B. | data <- read.csvo("foo.txt") |
C. | data <- readonly.csv("foo.txt") |
D. | data <- getonly.csv("foo.txt") |
Answer» B. data <- read.csvo("foo.txt") | |
3. |
Which of the following R code creates a connection to 'foo.txt'? |
A. | con <- file("foo.txt") |
B. | open(con, "r") |
C. | opencon(con, "r") |
D. | ocon(con, "r") |
Answer» B. open(con, "r") | |
4. |
Connections to text files can be created with the ________ function. |
A. | url |
B. | gzfile |
C. | bzfile |
D. | file |
Answer» E. | |
5. |
Which 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» C. loadAll("mydata.RData") | |