wmean | R Documentation |
Computes the weighted arithmetic mean of a vector.
wmean(x, w = rep(1, length(x)), na.rm = TRUE)
x |
numeric vector. |
w |
numeric vector of weights. |
na.rm |
a logical value indicating whether |
Maxime HERVE <maxime.herve@univ-rennes1.fr>
mean(1:10)
wmean(1:10,w=10:1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.