Description Usage Arguments Details Examples
View source: R/weighted-stats.r
Compute the median of weighted data.
1 | weighted.median(x, w, na.rm = FALSE)
|
x |
numeric vector of observations |
w |
integer vector of weights, representing the number of
time each |
na.rm |
If |
This is a simple wrapper around weighted.quantile
1 2 3 4 5 | x <- runif(200)
w <- rpois(200, 5) + 1
median(x)
weighted.median(x, w)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.