Skip to content
Prev 179245 / 398506 Next

Way to handle variable length and numbers of columns using read.table(...)

Its not clear exactly what the rules are for this but if we assume
that numbers always end in a decimal plus two digits then
using stapply from the gsubfn package:
+ 1 22.33 44.55
+ 2 66.77 88.99
+ 3 222.33344.55
+ 4 66.77 88.99"
[,1]   [,2]
[1,]  22.33  44.55
[2,]  66.77  88.99
[3,] 222.33 344.55
[4,]  66.77  88.99

See http://gsubfn.googlecode.com and for regular expressions see ?regex
On Mon, May 4, 2009 at 10:20 PM, Jason Rupert <jasonkrupert at yahoo.com> wrote: