skel_conf_interval: Skeleton for a confidence interval

View source: R/skeletons.R

skel_conf_intervalR Documentation

Skeleton for a confidence interval

Description

skel_conf_interval() is a vectorized function. Use it to make multiple intervals from, say, data-frame columns. skel_conf_interval_pair() is the unvectorized function. Use it to make a single interval from a vector (pair) of two numbers.

Usage

skel_conf_interval(xs, ys, skeleton = "[{xs}, {ys}]")

skel_conf_interval_pair(x, skeleton = "[{x[1]}, {x[2]}]")

Arguments

xs

a vector of the first elements in the intervals

ys

a vector of the second elements in the intervals

skeleton

glue-style format to fill. defaults to "[{xs}, {ys}]" for skel_conf_interval() and "[{x[1]}, {x[2]}]" for skel_conf_interval_pair().

x

a vector of two elements to plug into the confidence interval

Details

These functions are wrappers around calls to glue::glue().

Originally, skel_conf_interval() was named skel_conf_interval_v().

Value

strings representing confidence intervals

Examples

skel_conf_interval(c(.1, .2), c(.3, .4))
skel_conf_interval_pair(c(.1, .3))

tjmahr/printy documentation built on March 4, 2024, 1:25 a.m.