View source: R/print_decimals_specified.R
force_decimals | R Documentation |
Force printing a specified number of decimals for a number
force_decimals(x, decimals = 2)
x |
the numeric values to be printed |
decimals |
how many decimals are to be printed. Defaults to 2. |
The number in the required format
Martin Papenberg martin.papenberg@hhu.de
force_decimals(c(1.23456, 0.873, 2.3456))
force_decimals(c(1.23456, 0.873, 2.3456), 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.