Use the colClasses argument in combination with "NULL" for the columns you don't want to read. For example, this code reads the first column as character data and does not import the remaining 10 columns:
yourdata<-read.csv("yourdata.csv",colClasses=c(rep("character",3),rep("NULL",10))) HTH, Mark Na On Wed, Jun 17, 2009 at 2:59 PM, liujb <liujul...@yahoo.com> wrote: > > Hello, > > I have a data file (.csv) that has a size of about 2.6 GB. I am not able to > read in the whole data set because of the memory limit. I actually only > need > some columns (3 columns) of the data set, is there a way to read in > specified columns? > > I am using windows. > > Thanks, > Julia > -- > View this message in context: > http://www.nabble.com/how-to-read-in-only-some-columns-of-a-data-file-tp24081974p24081974.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.