Weighted Mean
Returns weighted mean of a numeric vector. In contrast to stats::weighted.mean
, w
does not need to be specified.
weighted_mean(x, w = NULL, ...)
x |
Numeric vector. |
w |
Optional non-negative, non-missing case weights. |
... |
Further arguments passed to |
A length-one numeric vector.
weighted_mean(1:10) weighted_mean(1:10, w = NULL) weighted_mean(1:10, w = 1:10)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.