format_ci | R Documentation |
Confidence/Credible Interval (CI) Formatting
format_ci(CI_low, ...)
## S3 method for class 'numeric'
format_ci(
CI_low,
CI_high,
ci = 0.95,
digits = 2,
brackets = TRUE,
width = NULL,
width_low = width,
width_high = width,
missing = "",
zap_small = FALSE,
ci_string = "CI",
...
)
CI_low |
Lower CI bound. Usually a numeric value, but can also be a
CI output returned |
... |
Arguments passed to or from other methods. |
CI_high |
Upper CI bound. |
ci |
CI level in percentage. |
digits |
Number of digits for rounding or significant figures. May also
be |
brackets |
Either a logical, and if |
width |
Minimum width of the returned string. If not |
width_low , width_high |
Like |
missing |
Value by which |
zap_small |
Logical, if |
ci_string |
String to be used in the output to indicate the type of
interval. Default is |
A formatted string.
format_ci(1.20, 3.57, ci = 0.90)
format_ci(1.20, 3.57, ci = NULL)
format_ci(1.20, 3.57, ci = NULL, brackets = FALSE)
format_ci(1.20, 3.57, ci = NULL, brackets = c("(", ")"))
format_ci(c(1.205645, 23.4), c(3.57, -1.35), ci = 0.90)
format_ci(c(1.20, NA, NA), c(3.57, -1.35, NA), ci = 0.90)
# automatic alignment of width, useful for printing multiple CIs in columns
x <- format_ci(c(1.205, 23.4, 100.43), c(3.57, -13.35, 9.4))
cat(x, sep = "\n")
x <- format_ci(c(1.205, 23.4, 100.43), c(3.57, -13.35, 9.4), width = "auto")
cat(x, sep = "\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.