Defines functions r.hc

Documented in r.hc

r.hc <-
function(x, weight, k){
  n <- length(x)
  if (is.null(weight)) weight <- rep(1, n)
  rhow <-k*weighted.median(x, weight)
  r.3 <- sum(weight[x > rhow])/sum(weight)
  return(list(count.rich = length(x[x>rhow]), r.hc=r.3))

Try the affluenceIndex package in your browser

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

affluenceIndex documentation built on Jan. 5, 2022, 5:07 p.m.