Pretty formatting of confidence intervals
Pretty much does what the title says.
formatCI(ci, sep = "; ", prefix = "[", suffix = "]", digits = 2, noZero = FALSE)
- A confidence interval (a vector of 2 elements; longer vectors work, but I guess that wouldn't make sense).
- The separator of the values, usually "; " or ", ".
- The prefix, usually a type of opening parenthesis/bracket.
- The suffix, usually a type of closing parenthesis/bracket.
- The number of digits to which to round the values.
- Whether to strip the leading zero (before the decimal point), as is typically done when following APA style and displaying correlations, p values, and other numbers that cannot reach 1 or more.
A character vector of one element.
### With leading zero ... formatCI(c(0.55, 0.021)); ### ... and without formatCI(c(0.55, 0.021), noZero=TRUE);
Looks like there are no examples yet.