average.Rd
Calculate the weighted average that maximizes the maximum likelihood estimator
A numeric vector with the values to be averaged.
A vector of weights of the same length as x
.
A character string, either: 'mean' or 'L2' (the default),
such that a weighted mean is computed using weightedMean
; or 'median' or 'L1', such
that a weighted median is computed using weightedMedian
.
Should NA
values be ignored? Default is na.rm = FALSE
.
A numeric value, representing the weighted mean or median