View source: R/Splitdata_MakeDataList.R
Splitdata_MakeDataList | R Documentation |
Split the data by a factor and make a list
Splitdata_MakeDataList(InputData, Group = group)
InputData |
The input matrix or data frame. Each row is a gene and each column is a cell ID. Required |
Group |
The factor to split the matrix/data frame |
A list of matrix split by Group variable
test.matrix<-matrix(sample(0:3,size=900,replace=TRUE),nrow=100,ncol=90)
colnames(test.matrix)<-paste0("Cell",1:90,sep="")
row.names(test.matrix)<-paste0("Gene",1:100,sep="")
sparseMatrix<-as(test.matrix,"sparseMatrix")
pdata<-data.frame(CellID=paste0("Cell",1:90,sep=""),CellGroup=rep(c("A","B","C"),c(20,30,40)))
list_test<-Splitdata_MakeDataList(InputData=sparseMatrix,Group=pdata$CellGroup)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.