Re: [R] How to save row values from a matrix into one vector?

2011-09-19 Thread Chris82
Thanks a lot! Works fine! -- View this message in context: http://r.789695.n4.nabble.com/How-to-save-row-values-from-a-matrix-into-one-vector-tp3818415p3823320.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

[R] How to save row values from a matrix into one vector?

2011-09-16 Thread Chris82
Dear R users, I guess, I have a quit simple problem, but I'm not getting the solution. I create a matrix like this: test - matrix(seq(1,3,1),ncol=5,nrow=3) then I want to create one vector, consisting of every row of the matrix. My first idea was to do this with a for loop. op - vector()

Re: [R] How to save row values from a matrix into one vector?

2011-09-16 Thread Uwe Ligges
On 16.09.2011 17:43, Chris82 wrote: Dear R users, I guess, I have a quit simple problem, but I'm not getting the solution. I create a matrix like this: test- matrix(seq(1,3,1),ncol=5,nrow=3) then I want to create one vector, consisting of every row of the matrix. My first idea was to do

Re: [R] How to save row values from a matrix into one vector?

2011-09-16 Thread Jean-Christophe BOUËTTÉ
This is want you want: op - as.vector(t(test)) JC 2011/9/16 Chris82 rubenba...@gmx.de: Dear R users, I guess, I have a quit simple problem, but I'm not getting the solution. I create a matrix like this: test - matrix(seq(1,3,1),ncol=5,nrow=3) then I want to create one vector, consisting