View source: R/formatting_functions.R
format_sigfig | R Documentation |
Format numeric values to print with a specified number of significant figures.
format_sigfig(sigfig, format = "xx", num_fmt = "fg")
sigfig |
( |
format |
( |
num_fmt |
( |
An rtables
formatting function.
Other formatting functions:
extreme_format
,
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_xx()
,
formatting_functions
fmt_3sf <- format_sigfig(3)
fmt_3sf(1.658)
fmt_3sf(1e1)
fmt_5sf <- format_sigfig(5)
fmt_5sf(0.57)
fmt_5sf(0.000025645)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.