Description Usage Arguments Value Examples
To prepare for submission. If numbers <0.001 round to 3 significant figures and use scientific notation. If numbers are larger, round numbers to 3 significant figures and pad to right if needed (i.e. if rounding leads to 0s)
1 | pad_number(x, digits = 3)
|
x |
A number (double) |
digits |
Number of significant figures to include |
Character string.
1 2 3 4 5 6 7 8 9 | #Small numbers (negative or positive) use scientific notation.
pad_number(-0.00000047641)
pad_number(0.00000047641)
#Larger numbers do not. Use 3 significant figures
pad_number(0.0128)
#Pad out to same length for all numbers
pad_number(0.1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.