round_numbers | R Documentation |
Rounds the values in its first argument to the specified number of decimal places. This function uses the U.S. Geological Survey rounding method.
round_numbers(x, digits = 0)
x |
'numeric' vector. Value to be rounded. |
digits |
'integer' vector or value.
Number of decimal places to use (default 0).
Values are recycled to match the vector length of |
A numeric vector of rounded values.
J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center
round_numbers(x = rep(pi, 3), digits = c(1, 2, 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.