What will be the output of the following R code? [code] > y <- data.frame(a = 1, b = "a") > dput(y) [/code]

What will be the output of the following R code?
Code:
> y <- data.frame(a = 1, b = "a")
> dput(y)
A.
Code:
structure(list(a = 1, b = list(1L, .Label = "a", class = "factor")), .Names\
= c("a",
"b"), row.names = c(NA, -1L), class = "data.frame")
B.
Code:
list(list(a = 1, b = list(1L, .Label = "a", class = "factor")), .Names\
= c("a",
"b"), row.names = c(NA, -1L), class = "data.frame")
C.
Code:
structure(list(a = 1, b = structure(1L, .Label = "a", class = "factor")), .Names\
= c("a",
"b"), row.names = c(NA, -1L), class = "data.frame")
D. Error
 

Tìm kiếm

Back
Top