Google News
logo
R - Quiz(MCQ)
Which of the following statement would read file "foo.txt"?
A)
data <- data(“foo.txt”)
B)
data <- read.data(“foo.txt”)
C)
data <- read.table(“foo.txt”)
D)
read.data <- read.table(“foo.txt”)

Correct Answer :   data <- read.table(“foo.txt”)


Explanation : R will automatically skip lines that begin with a #.

Advertisement