nice_estimate: Formats estimates and 95% confidence intervals for nice...

View source: R/nice_things.R

nice_estimateR Documentation

Formats estimates and 95% confidence intervals for nice printing.

Description

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

Usage

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)
nice_estimate(0.9, 0.8001, 0.95)

simonthelwall/nicethings documentation built on Feb. 27, 2023, 3:15 p.m.