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

From: Peter Dalgaard <>
Date: Thu 10 Mar 2005 - 19:21:18 EST

"Upasna Sharma" <> writes:

> 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?

You're not sayin what tools you are using to read in the first place, but notice that the colClasses argument to read.table can have NULL elements.

   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (             FAX: (+45) 35327907

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Thu Mar 10 19:53:16 2005

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