demean(x, na.rm = getOption("transx.na.rm")) demedian(x, na.rm = getOption("transx.na.rm")) demode(x, na.rm = getOption("transx.na.rm"))
x |
Univariate vector, numeric or ts object with only one dimension. |
---|---|
na.rm |
A value indicating whether NA values should be stripped before the computation proceeds. |
Returns a vector with the same class and attributes as the input vector.
#> Min. 1st Qu. Median Mean 3rd Qu. Max. #> 2.0 5.0 10.0 13.4 20.0 30.0demean(x)#> [1] -11.4 -8.4 -3.4 6.6 16.6demedian(x)#> [1] -8 -5 0 10 20demode(x)#> [1] -4.795224 -1.795224 3.204776 13.204776 23.204776