unite_ci: Unite estimates and confidence intervals

Description Usage Arguments Examples

View source: R/unite_ci.R

Description

create a character column by combining estimate, lower and upper columns. This is similar to tidyr::unite().

Usage

1
2
unite_ci(x, col = NULL, ..., remove = TRUE, digits = 2,
  m100 = TRUE, percent = FALSE, ci = FALSE)

Arguments

x

a data frame with at least three columns defining an estimate, lower bounds, and upper bounds.

col

the quoted name of the replacement column to create

...

three columns to bind together in the order of Estimate, Lower, and Upper.

remove

if TRUE (default), the three columns in ... will be replaced by col

digits

the number of digits to retain for the confidence interval.

m100

TRUE if the result should be multiplied by 100

percent

TRUE if the result should have a percent symbol added.

ci

TRUE if the result should include "CI" within the braces (defaults to FALSE)

Examples

1
2
print(cfr <- case_fatality_rate((1:4)*10, 50))
unite_ci(cfr, "CFR (CI)", cfr, lower, upper, m100 = FALSE, percent = TRUE)

R4EPI/r4epi documentation built on Oct. 16, 2019, 2:05 a.m.