Combine estimate with confidence interval into one string.

x_ci(
  x,
  l,
  u,
  digits = 2,
  brackets = TRUE,
  ci_sep = ", ",
  ci_prefix = NULL,
  na_vals = NULL
)

Arguments

x

Central estimate.

l

Lower estimate.

u

Upper estimate.

digits

Number of digits to use after decimal point.

brackets

Option to enclose confidence interval in brackets.

ci_sep

Separator for confidence interval.

ci_prefix

Optional prefix to add text before confidence interval.

na_vals

Value to use to replace missing values; if NULL, uses x.

Value

Estimate combined with confidence interval as a string.

Examples

if (FALSE) { # \dontrun{
x_ci(1.2, 0.7, 1.5, ci_sep = ", ", ci_prefix = "95% CI ")
} # }