R/GetPatterns.R

Defines functions GetPatterns

Documented in GetPatterns

GetPatterns<-function(Conditions){
  if(!is.factor(Conditions))Conditions=as.factor(Conditions)
	NumCond=nlevels(Conditions)
	if(NumCond<3)stop("Less than 3 conditions!")
	CondLevels=levels(Conditions)
    AllPartiList=sapply(1:NumCond,function(i)nkpartitions(NumCond,i))
    AllParti=do.call(rbind,AllPartiList)
	colnames(AllParti)=CondLevels
	rownames(AllParti)=paste("Pattern",1:nrow(AllParti),sep="")
	AllParti

}

Try the EBSeq package in your browser

Any scripts or data that you put into this service are public.

EBSeq documentation built on Nov. 8, 2020, 6:52 p.m.