This blog is a repository of cool things relating to statistical computing, simulation and stochastic modeling.
Or you could simply do as.vector(t(M))
I think you meanlibrary(gdata)c(t(M)) works too.The advantage of unmatrix(), according to the docs, is that it gives the resulting vector appropriate names. (If you look at the code of unmatrix() you'll see that most of it is taken up with constructing names: the actual data manipulation is done via c(x) or c(t(x)) depending on whether byrow is FALSE or TRUE.
Post a Comment