numfmt | R Documentation |
This function sets significant digits without rounding any numbers
numfmt(x, sdig = 3, snc = 6)
x |
a numerical vector |
sdig |
a single number defining the number of significant digits |
snc |
a single number defining the scientific notation cutoff (higher means notation is only used for very small or very large numbers) |
a character vector with formatted numbers
Richard Hooijmaijers
numfmt(c(0.012,12345,1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.