pretty_estimate: Pretty Estimate

Description Usage Arguments Value Examples

View source: R/formats.R

Description

Create character string of an estimate with its confidence limits.

Usage

1
pretty_estimate(estimate, limit_low, limit_high, n_dec = 3)

Arguments

estimate

Numeric estimate.

limit_low

Numeric estimate lower confidence interval.

limit_high

Numeric estimate higher confidence interval.

n_dec

Numeric indicating number of digits to round after decimal.

Value

Character string of formatted estimate.

Examples

1
2
3
4
5
iris_estimate   <- mean(iris$Petal.Length)
 iris_std_err   <- sd(iris$Petal.Length) / sqrt(length(iris$Petal.Length))
iris_limit_low  <- iris_estimate - 1.96 * iris_std_err
iris_limit_high <- iris_estimate + 1.96 * iris_std_err
pretty_estimate(iris_estimate, iris_limit_low, iris_limit_high, 2)

dgrisafe/styledom documentation built on April 9, 2021, 5:44 a.m.