sprintf_list: Sprintf with a list input

View source: R/zz-deprecated-mixture-distributions.R

sprintf_listR Documentation

Sprintf with a list input

Description

A variant of sprintf that work well with inputs that are in the format of a list. Good examples of which are the quantile functions

Usage

sprintf_list(format, params, na.replace = "―")

Arguments

format

the format string

params

the inputs as a list (rather than as a set of individual numbers)

na.replace

a value to replace NA values with.

Value

the formatted string

Examples

# generate a mixture confidence interval from a set of distributions
sprintf_list("%1.2f [%1.2f\u2013%1.2f]",
 qmixnorm(p=c(0.5,0.025,0.975),
 means=c(10,13,14), sds=c(1,1,2)))

terminological/ggrrr documentation built on June 15, 2024, 6:35 a.m.