FormatAsReal | R Documentation |
Formats real numbers nicely.
FormatAsReal(
x,
digits = 2,
decimals = NULL,
remove.leading.0 = FALSE,
comma.for.thousands = TRUE,
pad = FALSE
)
x |
The number(s) |
digits |
Number of significant digits. |
decimals |
Number of decimal places to show. If null, this is ignored. |
remove.leading.0 |
Removes the initial 0 from numbers that are less than 1. |
comma.for.thousands |
If TRUE, uses a comma when there are thousands. |
pad |
If a vector is supplied and |
Multiplies by 100, keeping digits
or more significant digits and
, and commas if in thousands or more.
Based on formatC
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.