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

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Wed 12 Jul 2006 - 23:54:07 EST

On Wed, 12 Jul 2006, David Vonka 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.

No. It is possible to read only some columns: see colClasses.

It is not clear that the ability to skip based on something defined on other columns would actually be useful, especially as you can read datasets in blocks, process the blocks and combine the results.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@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
Received on Thu Jul 13 00:06:15 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 13 Jul 2006 - 02:18:04 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.