[R] Selective column loads with scan()
ligges at statistik.uni-dortmund.de
Sun Jan 7 19:54:21 CET 2001
On Sun, 7 Jan 2001, Samir Mishra wrote:
> I have a very large data file with about 100 columns. Instead of loading
> all of the columns using read.table() (my PC won't be able to handle the
> resulting data frame), I'd like to read in one column of the datafile at
> a time using scan() in conjunction with the 'what = ' option. I've tried
> loading just the third column using -
> > scan(file.name, what = list(NULL, NULL, "", rep(NULL, 97)). ... )
> along with a couple of other options but I can't get the results I want
> (if I avoid an error). For example -
> > list(NULL, NULL, "", rep(NULL, 97))
>  ""
> is not what i'm looking for.
> Is there a better way to selectively read in individual columns from a tab
> separated data file?
> I've done this before, and that makes this exercise even more frustrating.
scan(file.name, what = list(, , ""), flush = TRUE)
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help