Compute the mean and standard deviation of a vector, returning a formatted string containing the values as `M +/- SD`
mean_sd(
x = NULL,
MoreArgs = NULL,
give_df = TRUE,
...,
mean_x = NULL,
sd_x = NULL
)# S3 method for default
mean_sd(
x = NULL,
MoreArgs = NULL,
give_df = TRUE,
...,
mean_x = NULL,
sd_x = NULL
)
# S3 method for data.frame
mean_sd(
x = NULL,
MoreArgs = NULL,
give_df = TRUE,
...,
mean_x = NULL,
sd_x = NULL
)
either a formatted character scalar (if give_df == FALSE
), or
else a data frame containing columns for the mean value, standard
deviation, and formatted character string combining the two.
numeric vector of values to summarize
named list of arguments to pass to mean
and sd
logical. Should mean, sd, and summary string be returned in a data frame?
additional arguments passed to format
an already-calculated mean value for x
an already-calculated sd value for x