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”)
The question was asked in quiz.
The origin of the question is Connection Interfaces in section R – Data Storage, Formats, Objects and Operations of R Programming