list to matrix in R matrix(unlist(l …

list to matrix in R

matrix(unlist(list.data), nrow=num.row, byrow=TRUE)

To convert list of list to matrix,

do.call(rbind, sapply(list.data, unlist))

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *