round_ | R Documentation |
Particularly when creating tables, it is often desirable to keep
all numbers to the same width. round()
and similar functions drop
trailing zeros - this version keeps them and thus rounds 1.201 to 1.20
rather than 1.2 when 2 digits are requested.
round_(x, digits = 2)
x |
Numeric vector to be rounded |
digits |
Number of significant digits |
Character vector of rounded values, with trailing zeroes as needed to show digits
figures after the decimal point
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.