powered by
Computes the weighted arithmetic mean of a vector.
wmean(x, w = rep(1, length(x)), na.rm = TRUE)
numeric vector.
numeric vector of weights.
a logical value indicating whether NA values should be stripped before the computation proceeds.
NA
Maxime HERVE <maxime.herve@univ-rennes1.fr>
mean(1:10) wmean(1:10,w=10:1)
Run the code above in your browser using DataLab