Skip to content

Loading only particular columns from csv file...

4 messages · Marko Milicic, Gabor Grothendieck, Charles C. Berry

#
See the colClasses= argument of read.table where you can use "NULL".
On Jan 14, 2008 6:02 PM, Marko Milicic <milicic.marko at gmail.com> wrote:
#
On Mon, 14 Jan 2008, Marko Milicic wrote:

            
There is a unix utility called 'cut' that enables stuff like

   columns.1.3.5.to.7 <- read.table( pipe( "cut -f1,3,5-7 myfile"  ) )

and if you have numeric data only, using scan() directly will save some space.

HTH,

Chuck
Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901
2 days later