Thursday, 29 August 2013

Transform 4 colunm matrix to a single 1 column matrix in R

Transform 4 colunm matrix to a single 1 column matrix in R

i trying to transform my matrix with 4 columns to a matrix with 1 column
like the example:
I tried the code, but the values appear in a list, and i want values that
i can do some operations!
f.con <- matrix (c(ex),
ncol=1, byrow=TRUE)
Initial matrix (ex)
0 3 2
0 2 1
0 1 1
Final matrix with 1 colunm:
0
0
0
3
2
1
2
1
1

No comments:

Post a Comment