I'd like ot vectorize a matrix in order to get the values "per rows". For example:
mat = matrix(1:4,ncol=2)
mat
[,1] [,2]
[1,] 1 3
[2,] 2 4
c(mat) # or as.vector(mat). Both give the values "per columns"
[1] 1 2 3 4
I would like to get this:
[1] 1 3 2 4