Format numeric values to print with a specified number of significant figures.
Arguments
- sigfig
(
integer
)
number of significant figures to display.- format
(
character
)
the format label (string) to apply when printing the value. Decimal places in string are ignored in favor of formatting by significant figures. Formats options are:"xx"
,"xx / xx"
,"(xx, xx)"
,"xx - xx"
, and"xx (xx)"
.- num_fmt
(
character
)
numeric format modifiers to apply to the value. Defaults to"fg"
for standard significant figures formatting - fixed (non-scientific notation) format ("f"
) andsigfig
equal to number of significant figures instead of decimal places ("g"
). See theformatC()
format
argument for more options.
See also
Other formatting functions:
extreme_format
,
format_auto()
,
format_count_fraction_fixed_dp()
,
format_count_fraction_lt10()
,
format_count_fraction()
,
format_extreme_values_ci()
,
format_extreme_values()
,
format_fraction_fixed_dp()
,
format_fraction_threshold()
,
format_fraction()
,
format_xx()
,
formatting_functions