weighted.iqr {Rrepest} | R 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))
[Package Rrepest version 1.5.4 Index]