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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.