I have a huge txt file and I only want to get out of it column 3 and 7. I tried to read the whole file and then extract the two columns, but I ran into a memory problem since the file is huge. Is it possible just to tell R to read these two columns without reading the whole file? Thanks -- View this message in context: http://www.nabble.com/reading-specific-columns-tp19805311p19805311.html Sent from the R help mailing list archive at Nabble.com.
What function are you using to read in your data file? If read.table, then see the help page for that function, specifically the colClasses argument "NULL". Erik kayj wrote:> I have a huge txt file and I only want to get out of it column 3 and 7. > I tried to read the whole file and then extract the two columns, but I ran > into a memory problem since the file is huge. > > Is it possible just to tell R to read these two columns without reading the > whole file? > > Thanks >