decimals_only {prmisc} | R Documentation |
Printing a specified number of decimals and ignore leading zeros
Description
Printing a specified number of decimals and ignore leading zeros
Usage
decimals_only(x, decimals = 2, decimals1 = FALSE)
Arguments
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. |
Value
Character vector of length length(x)
. The number(s) in the required format.
Author(s)
Martin Papenberg martin.papenberg@hhu.de
Examples
decimals_only(c(0.23456, 0.873, 0.3456), decimals = 3)
[Package prmisc version 0.0.3 Index]