开发者

Exclude columns in read.table() in R [duplicate]

This question already has answers here: Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜