format_count_fraction_fixed_dp: Format count and percentage with fixed single decimal place

View source: R/formatting_functions.R

format_count_fraction_fixed_dpR Documentation

Format count and percentage with fixed single decimal place

Description

[Experimental]

Formats a count together with fraction with special consideration when count is 0.

Usage

format_count_fraction_fixed_dp(x, ...)

Arguments

x

(numeric(2))
vector of length 2 with count and fraction, respectively.

...

not used. Required for rtables interface.

Value

A string in the format ⁠count (fraction %)⁠. If count is 0, the format is 0.

See Also

Other formatting functions: extreme_format, format_auto(), format_count_fraction(), format_count_fraction_lt10(), format_extreme_values(), format_extreme_values_ci(), format_fraction(), format_fraction_fixed_dp(), format_fraction_threshold(), format_sigfig(), format_xx(), formatting_functions

Examples

format_count_fraction_fixed_dp(x = c(2, 0.6667))
format_count_fraction_fixed_dp(x = c(2, 0.5))
format_count_fraction_fixed_dp(x = c(0, 0))


tern documentation built on June 22, 2024, 10:25 a.m.