Description Usage Arguments Details Value See Also Examples
Compute the mean of x
weighted by weights
.
1 |
x |
a numerical vector. |
weights |
a numerical vector of weights the same length as |
If weights
is NULL
, all elements of x
receive the
same weight. Observations with zero weights are omitted before the mean
is computed. Missing values are not handled specially and
produce a missing value as the result.
The weighted mean of x
.
Other weighted statistics:
wtd_median()
,
wtd_quantile()
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.