R/helpers.R

Defines functions sd2

#' @noRd

# Return SD only for numeric vector
sd2 <- function(x) {
    if (!is.numeric(x)) {
        return(NA)
      } else {
        return(stats::sd(x))
      }
  }

Try the stdmod package in your browser

Any scripts or data that you put into this service are public.

stdmod documentation built on Sept. 30, 2024, 9:42 a.m.