adplus-dvertising
frame-decoration

Question

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”)

Posted under R Programming

Answer: (a).data <- read.csv(“foo.txt”)

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following code opens a connection to the file foo.txt, reads from it, and closes the connection when its done?