R/mad.R

MAD.simple <- function(x) {
    nas <- length(which(is.na(x)))
    n <- length(x)
    not_na <- n - nas
    mad <- SAD.simple(x) / not_na
    return(mad)
}

MAD <- aggregatingFunction1 (MAD.simple)
mobilizingcs/MobilizePrime documentation built on May 23, 2019, 5:07 a.m.