Weighted mean
Compute the weighted mean.
weightedMean(x, weights = NULL, na.rm = FALSE)
x |
a numeric vector. |
weights |
an optional numeric vector giving the sample weights. |
na.rm |
a logical indicating whether missing values in |
This is a simple wrapper function calling weighted.mean
if sample weights are supplied and mean
otherwise.
The weighted mean of values in x
is returned.
Andreas Alfons
data(eusilc) weightedMean(eusilc$eqIncome, eusilc$rb050)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.