Re: [R] Dropping coloumns while redaing dtaa from text file.

From: Prof Brian Ripley <>
Date: Thu 10 Mar 2005 - 19:28:22 EST

On Thu, 10 Mar 2005, Upasna Sharma wrote:

> Hi
> I have a huge text file and .dat file from which I want to read data. I do
> not need all the columns in the files. I want to extract only some columns
> from the .txt file or the .dat file, because reading the entire file is
> becoming very difficult due to memory issues. Is it possible to extract a
> few columns from .txt or .dat file while reading the data in R?


Look at the use of NULL for 'colClasses' (read.table) or 'what' (scan), and also 'flush'.

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 Mar 10 19:42:39 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:42 EST