Google News
logo
R - Quiz(MCQ)
Which of the following R code creates a connection to 'foo.txt'?
A)
open(con, “r”)
B)
ocon(con, “r”)
C)
opencon(con, “r”)
D)
con <- file(“foo.txt”)

Correct Answer :   con <- file(“foo.txt”)


Explanation : Open is used for opening connection to ‘foo.txt’ in read-only mode.

Advertisement