View source: R/print_only_decimals.R
decimals_only | R Documentation |
Printing a specified number of decimals and ignore leading zeros
decimals_only(x, decimals = 2, decimals1 = FALSE)
x |
the values to be printed |
decimals |
how many decimals are to be printed. Defaults to 2. |
decimals1 |
Boolean - should a value of exactly 1 be converted to 1.00. Defaults to FALSE. |
Character vector of length length(x)
. The number(s) in the required format.
Martin Papenberg martin.papenberg@hhu.de
decimals_only(c(0.23456, 0.873, 0.3456), decimals = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.