View source: R/utils_mediation.R
weighted_mean | R Documentation |
weighted_mean
calculates a weighted mean, given a vector.
weighted_mean(x, weights, multiplier = NULL, na.rm = TRUE)
x |
numeric The the data set |
weights |
numeric The weights |
multiplier |
An additional vector to multiply
Default : |
na.rm |
Whether to remove NA values.
Default: |
numeric The weighted mean of the data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.