This function computes the *arithmetic mean*.
Arguments
- x
(named) numerical vector
- i
(optional) numerical vector giving the position in
x
or character vector matching the names inx
. Ifmissing
ori = NULL
, the entirex
is considered for the computation of the score- na.rm
logical, whether to remove
NA
values fromx
before computation- ...
further arguments to
mean
Value
A numerical value representing the computed measure.
A default NA
value is returned if the score can't be
computed.
Details
It is a wrapper to mean
function.
Examples
x = c(1,1,2,3,3,NA)
arithmeticMean(x = x, na.rm = TRUE)
#> [1] 2