R/nice_things.R
nice_estimate.Rd
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)
An estimate such as a rate ratio
The lower confidence interval
The upper confidence interval
A string in format d.d (95% CI: d.d-d.d)
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)"