[R] R tools for large files

Douglas Bates bates at stat.wisc.edu
Tue Aug 26 16:05:09 CEST 2003


"David Khabie-Zeitoune" <dave at evocapital.com> writes:

> For example,
> 
> > X = c("1,4,5" "1,2,5" "5,1,2")

I think you meant 

> X = c("1,4,5", "1,2,5", "5,1,2")

A simpler approach is to use a textConnection which allows you to read
a vector of character strings as if they were lines in a file.

> read.table(textConnection(X), sep=',')
  V1 V2 V3
1  1  4  5
2  1  2  5
3  5  1  2




More information about the R-help mailing list