Description Usage Arguments Value See Also Examples
formatNumeric
converts numeric values to character
and can apply various pretty formatting
1 | formatNumeric(x, type, digits = 0)
|
x |
numeric vector on which to apply formatting/conversion |
type |
the type of formatting to use; valid values are "int", "dlr" and "pct" |
digits |
non-negative integer value indicating the number of decimal places to use |
A character vector of the converted/formatted numeric input.
1 2 3 4 5 | x <- rnorm(5)
print(x)
formatNumeric(x, "pct", 1)
formatNumeric(x*10000, "int")
formatNumeric(x*10000, "dlr", digits = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.