Learn R Programming

rgeoda (version 0.0.6)

median_absolute_deviation: Median absolute deviation

Description

Median absolute deviation to measure measure of the variability of a univariate sample of quantitative data

Usage

median_absolute_deviation(data)

Arguments

data

A list of numeric vectors (multi-variables) for median absolute deviation

Value

A list of numeric vectors from MAD

Examples

Run this code
# NOT RUN {
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- geoda_open(guerry_path)
guerry_df <- as.data.frame(guerry) # use as data.frame
crm_prs <- guerry_df['Crm_prs'][,1] # get values of variable "crm_prs"
crm_prp <- guerry_df['Crm_prp'][,1] # get values of variable "crm_prp"
data <- list(crm_prs, crm_prp)
median_absolute_deviation(data)
# }

Run the code above in your browser using DataLab