reportCI: Report CI

View source: R/utilities_math.R

reportCIR Documentation

Report CI

Description

Internal soundgen function

Usage

reportCI(n, digits = 2, suffix = NULL)

Arguments

n

numeric vector or matrix

digits

number of decimal points to preserve

Details

Takes a numeric vector or matrix with three elements / columns: fit, lower quantile from a CI, and upper quantile from a CI. For each row, it prints the result as fit and CI in square brackets

Examples

n = rnorm(100)
soundgen:::reportCI(quantile(n, probs = c(.5, .025, .975)))

a = data.frame(fit = c(3, 5, 7),
               lwr = c(1, 4, 6.5),
               upr = c(5, 6, 7.1))
soundgen:::reportCI(a, 1)
soundgen:::reportCI(a, 1, ' cm')
soundgen:::reportCI(a, 1, '%, 95% CI')

soundgen documentation built on Aug. 14, 2022, 5:05 p.m.