Skip to content
Prev 156015 / 398502 Next

Fetching a range of columns

Hi Jason,

data[] is a data frame, remember--you need to specify rows AND columns. So,
data[,c(2,12,17)] is what you should be doing in the first place, and
data[,842:2411] in the second place.

Not sure if the help you needed was using the comma, or the : syntax, or if
you're trying to read only certain columns during the read.csv process
(which I don't think that's possible).

--Adam
On Sun, 14 Sep 2008, Jason Thibodeau wrote: