Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

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: a
Explanation: Connections must be opened, then the are read from or written to, and then they are closed.

Join The Discussion