R/r.is.R

r.is <-
function(x,p){
q.p <-rep(quantile(x,c(p)), length(x))
ind <- ifelse(x>q.p,1,0)
r.2 <-sum(x*ind)/sum(x)

return(r.2)
}

Try the affluenceIndex package in your browser

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

affluenceIndex documentation built on May 2, 2019, 8:20 a.m.