[R] question about cbind()
jz7 at duke.edu
jz7 at duke.edu
Sun Aug 20 01:58:39 CEST 2006
Dear all,
I have a question about how to get a matrix by combining a large number of
columns from a data file. Suppose I read a file which have 1000 columns
by:
test = read.table("dat.txt", header=F)
I know I could use "cbind()". It's easy to do when the number of columns
is small (i.e. cbind(test$V1, test$V2)). But how about build a matrix "X"
by combine the first 500 columns. Is there an easy way to write the
expression?
Thanks so much!
Jeny
More information about the R-help
mailing list