Learn R Programming

reldist (version 1.6-6)

wtd.iqr: Weighted Interquartile range

Description

Compute weighted Interquartile range (iqr)

Usage

wtd.iqr (x, na.rm = FALSE, weight=FALSE)

Arguments

x

Vector of data, same length as weight

na.rm

Logical: Should NAs be stripped before computation proceeds?

weight

Vector of weights

Value

Returns an empirical interquartile range from a weighted sample.

Details

Uses a simple algorithm based on sorting.