Let’s define a data frame that contains two columns of values (one small and one large). After creating a simple gt table from small_large_tbl we’ll call fmt_engineering() on both columns.
Notice that within the form of m x 10^n, the n values move in steps of 3 (away from 0), and m values can have 1-3 digits before the decimal. Further to this, any values where n is 0 results in a display of only m (the first two values in the large column demonstrates this).
Engineering notation expresses values so that they are align to certain SI prefixes. Here is a table that compares select SI prefixes and their symbols to decimal and engineering-notation representations of the key numbers.
The default method of styling the notation uses the ‘m x 10^n’ construction but this can be changed to a ‘mEn’ style via the exp_style argument. We can supply any single letter here and optionally affix a "1" to indicate there should not be any zero-padding of the n value. Two calls of fmt_engineering() are used here to show different options for styling in engineering notation.