Specify text format via a sprintf format string
sprintf_format(format)
character(1). A format string passed to sprintf.
A formating function which wraps and will apply the specified printf
style format string format
.
fmtfun <- sprintf_format("(N=%i")
format_value(100, format = fmtfun)
#> [1] "(N=100"
fmtfun2 <- sprintf_format("%.4f - %.2f")
format_value(list(12.23456, 2.724))
#> [1] "12.23456, 2.724"