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)
}
lengning/EBSeq documentation built on May 21, 2019, 4:02 a.m.