R/subInterestResult.R

Defines functions subInterestResult

Documented in subInterestResult

subInterestResult<-function(x, selectRow, selectCol, 
	sampleAnnoCol, sampleAnnotation=c()){
	if(!missing(selectRow))
		tmpObj<-x[selectRow,]
	sampleTF=rep(TRUE, ncol(x))
	if(!missing(selectCol)){
		sampleTF<-rep(FALSE, ncol(x))
		sampleTF[selectCol]<- TRUE
	}
	if(!missing(sampleAnnoCol)){
		sampleTF<-sampleTF & !is.na(match(
			SummarizedExperiment::colData(x)[,sampleAnnoCol], 
				sampleAnnotation))
	}
	res<-tmpObj[,sampleTF]
	return(res)
}

Try the IntEREst package in your browser

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

IntEREst documentation built on Nov. 8, 2020, 8:05 p.m.