Skip to content
Prev 108025 / 398498 Next

Vector to Matrix transformation

How to suppress the recycling of items in a matrix..instead NA can be
filled.
-----Original Message-----
From: Chuck Cleland [mailto:ccleland at optonline.net] 
Sent: Tuesday, January 23, 2007 8:00 PM
To: Shubha Vishwanath Karanth
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] Vector to Matrix transformation
Shubha Vishwanath Karanth wrote:
into
updated.
You could try the following:

matrix(V1, nrow=5)

  but note what happens when the length of V1 is not a multiple of 5.
http://www.R-project.org/posting-guide.html