[R] Is it possible to only read a subset by read.table ?

Roger Peng rdpeng at gmail.com
Wed Jul 12 15:06:51 CEST 2006


It's not so straightforward as that, but you could construct something
with readLines().

-roger

On 7/12/06, David Vonka <D.Vonka at uvt.nl> wrote:
> Hello,
>
> is it possible to do something like
>
> DATA <- read.table(file="blabla.dat",subset=(sex=="male")),
>
> i.e. make R read only a subset of a csv file ?
> I think it would be useful in case of very big datasets,
> but I can't find such a feature.
>
> Thanks for an answer,
> David Vonka
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>


-- 
Roger D. Peng  |  http://www.biostat.jhsph.edu/~rpeng/



More information about the R-help mailing list