Learn R Programming

mosaic (version 0.9.1-3)

MAD: All pairs mean and sum of absolute differences

Description

All pairs mean and sum of absolute differences

Usage

MAD(x, ..., na.rm = getOption("na.omit", FALSE))

SAD(x, ..., na.rm = getOption("na.omit", FALSE))

Arguments

x
a numeric vector
...
if present, appended to x
na.rm
a logical indicating whether NAs should be removed before calculaing.

Value

  • the mean or sum of the absolute differences between each pair of values in c(x,...).

See Also

link{mad}

Examples

Run this code
SAD(1:3)
MAD(1:3)

Run the code above in your browser using DataLab