Format mean and confidence interval
Usage
format_mean_ci(mn, ll, ul, digits = 1, ci_sep = "–")
Arguments
- mn
Numeric, the mean value.
- ll
Numeric, the lower limit of the confidence interval.
- ul
Numeric, the upper limit of the confidence interval.
- digits
Integer, number of decimal places for rounding (default: 1).
- ci_sep
Character, separator within CI (default: "–" (en dash)).
Value
A character string formatted as "mean (lower_limit-upper_limit)".
Examples
if (FALSE) { # \dontrun{
format_mean_ci(10.1234, 9.8765, 10.3456)
format_mean_ci(100.5, 98.6, 102.4, digits = 0)
format_mean_ci(0.123, 0.100, 0.150, digits = 3, ci_sep = " to ")
} # }