View source: R/round_and_format.R
round_and_format | R Documentation |
round_and_format
rounds and formats a numeric vector. This is useful for
providing output for tables or plots in a standardized format.
round_and_format( x, digits = 2, sign_digits = NULL, scientific = FALSE, trim = TRUE )
x |
A numeric vector. |
digits |
Number of decimal places. |
sign_digits |
Number of significant digits (if given this overrides
|
scientific |
logical: whether encoding should be in scientific notation or not. |
trim |
logical: if leading blanks for justification to common width should be excluded or not. |
Rounded and formatted values as characters.
Geir H. Bolstad
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.