I am new to R and trying to read a csv. The documentation shows a function read.csv()
. However, when I read the file and check the type of the variable it shows a list. Documentation shows it as a data.frame
. Can someone explain why it happens that way?
My code so far:
mytable<-read.csv(InputFile,header=TRUE,stringsAsFactors=FALSE)
dim(mytable)
typeof(mytable)
Output:
dim(mytable)
[1] 500 20
typeof(mytable)
[1] "list"