View source: R/developer_utils.R
round2char | R Documentation |
Round numeric values to an exact number of digits and return as a character
round2char(x, digits = 3, na_replace = "", omit_leading_zero = FALSE)
x |
Numeric values |
digits |
Number of digits to which result should be rounded |
na_replace |
Scalar value: Character with which NA values should be replaced |
omit_leading_zero |
Logical scalar determining whether to omit leading zeros ( |
A vector of rounded numbers converted to characters
# round2char(x = .50000005)
# round2char(x = NA, na_replace = "---")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.