Description Usage Arguments Examples
Compute the weighted mean of data.
1 | WeightedMean(x, weights = NULL, normwt = "ignored", na.rm = TRUE)
|
x |
a numeric vector. |
weights |
a numeric vector of weights of |
normwt |
ignored at the moment. |
na.rm |
a logical, if |
1 2 3 4 | x <- sample(10,10)
w <- sample(5,10, replace=TRUE)
WeightedMean(x, w)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.