Putting rows as a single column in r
Something like this?
X <- matrix(letters[1:9], ncol=3)
matrix(X, ncol=1)
R matrices are in column major order, so you can easily concatenate them into a single column vector with the matrix
function.
I find stack
also very useful
X <- data.frame(matrix(letters[1:9], ncol=3),stringsAsFactors=FALSE)
stack(X)[,"values",drop=FALSE]