extreme_format {tern}R Documentation

Format extreme values

Description

[Stable]

rtables formatting functions that handle extreme values.

Usage

h_get_format_threshold(digits = 2L)

h_format_threshold(x, digits = 2L)

Arguments

digits

(integer(1))
number of decimal places to display.

x

(numeric(1))
value to format.

Details

For each input, apply a format to the specified number of digits. If the value is below a threshold, it returns "<0.01" e.g. if the number of digits is 2. If the value is above a threshold, it returns ">999.99" e.g. if the number of digits is 2. If it is zero, then returns "0.00".

Value

Functions

See Also

Other formatting functions: format_auto(), format_count_fraction(), format_count_fraction_fixed_dp(), 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

h_get_format_threshold(2L)

h_format_threshold(0.001)
h_format_threshold(1000)


[Package tern version 0.9.4 Index]