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 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: a
Explanation: Open is used for opening connection to ‘foo.txt’ in read-only mode.

Join The Discussion