Skip to contents

unit_conversion() can be used to yield conversion factors across compatible pairs of units. This is useful for expressing values in different units and the conversion can be performed via the scale_by argument available in several formatting functions. When calling unit_conversion(), one must supply two string-based keywords to specify the value's current units and the desired units. All of these keywords are provided in the table shown by calling info_unit_conversions().




An object of class gt_tbl.


Get a table of info on all the available keywords for unit conversions.

This image of a table was generated from the first code example in the `info_unit_conversions()` help file.

Function ID


Function Introduced

v0.11.0 (July 9, 2024)