Computes arithmetic mean of a vector with numeric or logical values.
my_mean(x, na.rm = TRUE, inf.rm = TRUE)
x | A numeric or logical vector. |
---|---|
na.rm | Boolean specifying whether or not to remove NA and NaN values.. |
inf.rm | Boolean specifying whether or not to remove Inf values. |
The arithmetic mean of the values in x returned as a numeric vector of length one.
x <- 1:10 my_mean(x)#> [1] 5.5