`splitMatrix` <- function(x, col=1) { ncol <- ncol(x) l <- split(x, x[,col]) lapply(l, function(subM) matrix(subM, ncol=ncol)) }
Add the following code to your website.
REMOVE THIS Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.