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

From: Prof Brian Ripley <>
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,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
PLEASE do read the posting guide!
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 Please read the posting guide before posting to the list.