weighted_mean | R Documentation |
Computes a weighted mean of a vector, matrix, or a three dimensional array.
weighted_mean(x, w, na.rm)
x |
A numeric vector, matrix, three dimensional array, or an |
w |
A numeric vector of non-negative weights. Will be automatically normalised to sum to one. |
na.rm |
If |
A weighted mean.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.