powered by
Note: NA is returned if the element is missing (NA).
getNDecimalsRule(x, rule = c("1"))
Numeric vector of same length than x
x
with the number of decimals.
Numeric vector.
Character vector with rule to use to derive the number of parameters. Currently only: '1' is implemented.
'1': standard rule for the number of decimals for individual values for a continuous variable:
value < 1 ('very small values'): 3
value < 10: 2
value in [10, 1000[: 1
value >= 1000: 0
Laure Cougnaud
x <- c(0.99, 5.679, 50.45, 1450) getNDecimalsRule(x = x)
Run the code above in your browser using DataLab