R/nRank.R

Defines functions nRank

#' Quantile Ranking Calculation
#' @noRd
nRank <- function(x, n) {
  as.numeric(cut(-x, breaks = quantile(-x,
    probs = seq(0, 1, length = n + 1),
    na.rm = TRUE
  ), include.lowest = TRUE))
}

Try the giniCI package in your browser

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

giniCI documentation built on April 3, 2025, 7:35 p.m.