decimal_place | R Documentation |
Cut a numeric vector to a certain number of decimal places
decimal_place(x, k = 2)
dec_plac(x, k = 2)
x |
A numeric vector. |
k |
The number of decimal places. |
A character vector with the correct number of decimal places.
decimal_place(pi, 3)
decimal_place(c(exp(1), pi, sqrt(2)), 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.