sprintf_format: Specify text format via a 'sprintf' format string

View source: R/format_value.R

sprintf_formatR Documentation

Specify text format via a sprintf format string

Description

Specify text format via a sprintf format string

Usage

sprintf_format(format)

Arguments

format

(string)
a format string passed to sprintf().

Value

A formatting function which wraps and applies the specified sprintf-style format to string format.

See Also

sprintf()

Examples

fmtfun <- sprintf_format("(N=%i")
format_value(100, format = fmtfun)

fmtfun2 <- sprintf_format("%.4f - %.2f")
format_value(list(12.23456, 2.724))


formatters documentation built on Sept. 13, 2024, 1:10 a.m.