weighted.iqr: Weighted inter-quantile range

View source: R/weighted_iqr.R

weighted.iqrR Documentation

Weighted inter-quantile range

Description

Computes the weighted inter-quantile range of a numeric vector.

Usage

weighted.iqr(x, w = rep(1, length(x)), rang = c(0.25, 0.75))

Arguments

x

(numeric vector) Variable of interest for which to compute the inter-quantile range

w

(numeric vector) Vector with the weights

rang

(numeric vector) Two numbers between 0 and 1 indicating the desired inter-quantile range

Value

Scalar containing the inter-quantile range

Examples

weighted.iqr(x = mtcars$mpg, w = mtcars$wt,  rang = c(.5,.9))
  

Rrepest documentation built on April 4, 2025, 2:07 a.m.