Learn R Programming

descriptr (version 0.3.0)

ds_mdev: Mean Absolute Deviation

Description

Compute the mean absolute deviation about the mean

Usage

ds_mdev(x)

Arguments

x

a numeric vector

Value

Mean absolute deviation of x

Deprecated Function

stat_mdev() has been deprecated. Instead use ds_mdev().

Details

The stat_mdev function computes the mean absolute deviation about the mean. It is different from mad in stats package as the statistic used to compute the deviations is not median but mean. Any NA values are stripped from x before computation takes place

See Also

mad

Examples

Run this code
# NOT RUN {
ds_mdev(mtcars$mpg)
# }

Run the code above in your browser using DataLab