R/utils.R

Defines functions getOutlier get_q

# this is a helper function for the below funcntion
get_q <- function(q.list){
	function(x,y){
		q.list[[x]][[y]]
	}

}



getOutlier <- function(profileMatrix, sample.name){
	function(outlr.indicator){
		res <- apply(profileMatrix[, sample.name, drop = FALSE], 2, function(x){ which(x == outlr.indicator)})
		lapply(res,function(x){rownames(profileMatrix[x, , drop = FALSE])})
	}
}

Try the oppar package in your browser

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

oppar documentation built on Nov. 8, 2020, 7:37 p.m.