list2mat | R Documentation |
List to Matrix
list2mat(matlist, direction = c("c", "r")[1])
matlist |
list of matrices to concatenate |
direction |
character, r or c, to indicate whether should be row-wise (i.e., rbind to match on columns) or column-wise (i.e., cbind to match on rows). Defaults to columnwise (matching on rows) to match convention of SingleCellExperiments |
matrix
listofmats <- list(matrix(sample(seq(0,20,1),100,replace = TRUE),nrow = 10), matrix(sample(seq(0,20,1),1000,replace = TRUE),nrow = 10)) newmat <- list2mat(listofmats) # to "cbind" them listofmats_t <- lapply(listofmats,t) newmat_t <- list2mat(listofmats_t, 'r') # to "rbind" them
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.