View source: R/signif_custom.R
signif_custom | R Documentation |
A combination of the the signif()
and
ceiling()
/floor()
functions. It
allows numbers to be rounded to a provided number of significant digits, but
to specifically have ceiling()
or
floor()
applied for the rounding.
signif_custom(x, digits = 1, option = ceiling)
x |
Numeric vector to be rounded to set significant figures |
digits |
Number of significant figures to round to |
option |
Specific rounding function to apply; options are |
Numeric vector of rounded numbers
signif_custom(1014, digits = 2) signif_custom(67362, digits = 3, option = floor)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.