Re: [R] Transforming a data matrix into a vector

2011-05-30 Thread Charles Ellis
Brilliant! Works like a charm. Thanks both. Cheers, Charles From: Richard M. Heiberger [mailto:r...@temple.edu] Sent: Monday, May 30, 2011 4:36 PM To: Charles Ellis Cc: r-help@R-project.org Subject: Re: [R] Transforming a data matrix into a vector > tmp <- matrix(c(5,3,1, 1,3,2, 1,2,4)

[R] Transforming a data matrix into a vector

2011-05-30 Thread Charles Ellis
Hi, I am trying to transform a data matrix into a vector and have not be able to accomplish want I am looking for. The setup is as follows. I start with a 3 x 3 matrix: 5 1 3 3 3 2 1 2 4 I would like to transorm it into a 27 x 1 vector of the follwing form 5 5 5 1 1 1 3 3 3 . . . 1 1 1 2 2 2