Skip to content
Prev 312944 / 398503 Next

list to matrix?

On Tue, Dec 4, 2012 at 8:09 PM, Sam Steingold <sds at gnu.org> wrote:
do.call(rbind, LIST)

or

do.call(cbind, LIST)

depending on your desired direction. The do.call syntax takes a
function name and uses a list as arguments to that function, returning
the result. Super useful for these situations where you collect things
and something like

cbind(x[[1]],x[[2]], x[[3]]...)

isn't feasible or possible.

MW