rowvar import error in R
csv, import, r
Solution
The row.names argument should be a vector which has the length of the number of rows. Simply omitting the argument for now would probably fix the issue. The documentation is clear about row.names being a vector, although raising a more informative exception would be nice.
Problem
I am trying to import a .csv file into R with: ``` mydata <- read.table("c:/data.csv", header=TRUE, sep=",", row.names="id") ``` But keep getting: ``` Error in data[[rowvar]] : attempt to select less than one element ``` The .csv file looks like: ``` Title1,Title2,Title3 1,2,3 4,5,6 7,8,9 ``` Any help would be much appreciated!