Splitdata_MakeDataList: Splitdata_MakeDataList

View source: R/Splitdata_MakeDataList.R

Splitdata_MakeDataListR Documentation

Splitdata_MakeDataList

Description

Split the data by a factor and make a list

Usage

Splitdata_MakeDataList(InputData, Group = group)

Arguments

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

Value

A list of matrix split by Group variable

Examples


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)

yuanqingyan/singleGEO documentation built on Jan. 11, 2025, 6:35 p.m.