[R] Way to handle variable length and numbers of columns using read.table(...)
jasonkrupert at yahoo.com
Tue May 5 04:20:53 CEST 2009
I've got read.table to successfully read in my table of three columns. Most of the time I will have a set number of rows, but sometime that will be variable and sometimes there will be only be two variables in one row, e.g.
Time Loc1 Loc2
1 22.33 44.55
2 66.77 88.99
4 66.77 88.99
Is there any way to have read.table handle (1) a variable number of rows, and (2) sometime there are only two variables as shown in Time = 3 above?
Just curious about how to handle this, and if read.table is the right way to go about or if I should read in all the data and then try to parse it out best I can.
system i386, darwin8.11.1
svn rev 46754
version.string R version 2.8.0 (2008-10-20)
More information about the R-help