esawdust wrote: > > Here's the contents of a simple test2.csv CSV file: > > #,Status,Project > 5842,New,Test > >> snortalerts = read.table( "/Users/lcox/Documents/test2.csv", header=TRUE, >> sep=",", row.names="#") > Error in data[[rowvar]] : attempt to select less than one element > > Landon >
Figured out the answer, though it wasn't obvious (to me anyway). The symbol "#" used as the first column label was the problem. I changed that to be "id" and changed the read.table to be: snortalerts <- read.table( "/Users/lcox/Documents/test2.csv", header=TRUE, sep=",", row.names="id") and it worked fine. -- View this message in context: http://www.nabble.com/Simple-question-about-error-on-CSV-import-tp25242899p25243159.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.