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

Gabor Grothendieck ggrothendieck at gmail.com
Wed Jul 12 14:49:02 CEST 2006


You can use pipe with read.table as in:

http://tolstoy.newcastle.edu.au/R/help/06/02/20379.html

Also note skip= and nrows= arguments to read.table.

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
>



More information about the R-help mailing list