[R] Vector to Matrix transformation

From: Shubha Vishwanath Karanth <shubhak_at_ambaresearch.com>
Date: Tue 23 Jan 2007 - 14:10:56 GMT


Hi R,  

I have a vector V1 of unknown length, say n. I need to convert this into a matrix C of row size=5, and accordingly the column should be updated. I tried with:  

C=as.matrix(V1,5,n/5)  

But it is not working...Could somebody help me on this?  

Thanks in advance...  

        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch 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 Jan 24 01:28:33 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 23 Jan 2007 - 15:30:28 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.