format_xx_fct {junco} | R Documentation |
Function factory for xx style formatting
Description
A function factory to generate formatting functions for value formatting that support the xx style format and control the rounding method
Usage
format_xx_fct(
roundmethod = c("sas", "iec"),
na_str_dflt = "NE",
replace_na_dflt = TRUE
)
Arguments
roundmethod |
(
|
na_str_dflt |
Character to represent NA value |
replace_na_dflt |
logical(1). Should an |
Value
format_xx_fct()
format function that can be used in rtables formatting calls
See Also
Other JJCS formats:
count_fraction
,
jjcsformat_pval_fct()
,
jjcsformat_range_fct()
Examples
jjcsformat_xx_SAS <- format_xx_fct(roundmethod = "sas")
jjcsformat_xx <- jjcsformat_xx_SAS
rcell(c(1.453), jjcsformat_xx("xx.xx"))
rcell(c(), jjcsformat_xx("xx.xx"))
rcell(c(1.453, 2.45638), jjcsformat_xx("xx.xx (xx.xxx)"))