R/colSe.R

Defines functions colSe

Documented in colSe

colSe <- function (x, na.rm = TRUE) {
    if (na.rm) {
        n <- colSums(!is.na(x))
    } else {
        n <- nrow(x)
    }
    colVar <- colMeans(x*x, na.rm = na.rm) - (colMeans(x, na.rm = na.rm))^2
    return(sqrt(colVar/n))
}
mcanouil/myScriptsMickael documentation built on May 22, 2017, 1:08 a.m.