Skip to content

Commit

Permalink
Re-write mean_sd()
Browse files Browse the repository at this point in the history
  • Loading branch information
jbengler committed Dec 16, 2024
1 parent e07da9f commit 1061c78
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,10 @@ min_max <- function(x) {
}

mean_sd <- function(x) {
dplyr::rename(data.frame(as.list(Hmisc::smean.sdl(x, mult = 1))),
y = Mean, ymin = Lower, ymax = Upper)
x <- stats::na.omit(x)
data.frame(y = mean(x),
ymin = mean(x) - stats::sd(x),
ymax = mean(x) + stats::sd(x))
}

mean_cl_boot <- function(x) {
Expand Down

0 comments on commit 1061c78

Please sign in to comment.