R/percentile.R

Defines functions percentile

percentile <- function(x, distn, include.observed=FALSE)
{
  if(include.observed)
    distn <- c(x, distn)
  
  n <- length(distn)
    
  return(findInterval(x, distn[order(distn)]) / n)
}

Try the gmodels package in your browser

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

gmodels documentation built on May 2, 2019, 5:46 p.m.