IQRw: The (weighted) Interquartile Range

IQRwR Documentation

The (weighted) Interquartile Range

Description

computes interquartile range of the x values. Weights are supported.

Usage

IQRw(x, weights = NULL, na.rm = FALSE, type = 7)

Arguments

x

a numeric vector.

weights

an optional numeric vector giving the sample weights.

na.rm

logical. Should missing values be removed?

type

an integer selecting one of the many quantile algorithms, see Quantile().

Details

This implementation is based on Quantile() function, which allows to define weights.

Author(s)

Andri Signorell <andri@signorell.net>

See Also

Median(), Quantile(), IQR(), quantile()

Examples

x <- c(3.7,3.3,3.5,2.8)
w <- c(5, 5, 4, 1)/15

IQRw(x=x, weights=w)

AndriSignorell/DescTools documentation built on Nov. 11, 2024, 12:11 p.m.