[R] combine variables to matrix

From: Andre Jung <ajung_at_gfz-potsdam.de>
Date: Wed, 12 Dec 2007 16:00:37 +0100


I just got stuck with a quite simple question. I've just read in an ASCII table from a plain text file with read.table(). It's a 1200x1200 table. R has assigned variables for each column: V1,V2,V3,V4,... For small data sets

data <- read.table("data.txt");
data.matrix <- cbind(V1,V2,V3);

works. But how could I put together 1200 columns?

I've searched the R mailing help and stumbled upon this entry: https://stat.ethz.ch/pipermail/r-help/2007-July/137121.html which doesn't help me.

thanks for your help.

andre



R-help_at_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. Received on Wed 12 Dec 2007 - 15:06:25 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 13 Dec 2007 - 00:30:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.