R/printMeanSDn.R

#' Functions to get mean and SD with different Ns
#' @description Functions to get mean and SD used by createNiceTable()

printMeanSDn <- function (vec) {
  sprintf("%.1f (%.1f), %.0f", mean(vec, na.rm = TRUE), sd(vec, na.rm = TRUE), sum(!is.na(vec)))
}
mssm-msf-2019/BiostatsALL documentation built on May 22, 2019, 12:16 p.m.