Calculate a weighted mean.
weighted_mean
calculates a weighted mean, given a vector.
weighted_mean(x, weights, multiplier = NULL, na.rm = TRUE)
x
: numeric The the data setweights
: numeric The weightsmultiplier
: An additional vector to multiply Default : NULL
na.rm
: Whether to remove NA values. Default: TRUE
numeric The weighted mean of the data.
Useful links