Rounds estimates to 1 decimal place and copies similarly formatted confidence intervals inside brackets. If you want a really good inline output from a regression model, see Benjamin Nutter's dust_inline from his package pixiedust

nice_estimate(estimate, lci, uci)

Arguments

estimate

An estimate such as a rate ratio

lci

The lower confidence interval

uci

The upper confidence interval

Value

A string in format d.d (95% CI: d.d-d.d)

Examples

nice_estimate(100.111, 90.0, 110.000002)
#> [1] "100.1 (95% CI:90.0-110.0)"
nice_estimate(0.9, 0.8001, 0.95)
#> [1] "0.9 (95% CI:0.8-0.9)"