R/crit_fun.R

crit_fun<-function (PPEE, thre) 
{
    y <- cumsum(sort(PPEE))/(1:length(PPEE))
    mm <- y < thre
    index <- sum(mm)
    if (index > 0) {
        out <- 1 - sort(PPEE)[index]
	    }		
    if (index == 0) {
		        out <- 1
				    }
    names(out) <- NULL
    return(out)
}

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.