Exclude columns in read.table() in R [duplicate]
Possible Duplicate:
Only read limited number of columns in R
I have a data text file with a million observations and 150 variable (v1 to v150) delimited by semicolons. I need only a selected handful of variables. Is there any way to read in only the variables I need? I am using read.table("filepath/filename.txt", sep=";", header开发者_如何学Go=T)
. If there is any other way than read.table()
with which this can be done?
See help(read.table)
and particularly the colClasses
argument. Simply set the columns you want to ignore to NULL
and they will be skipped.
精彩评论