round_levels: Round a vector (of levels)

Description Usage Arguments Value Note Examples

Description

Round a vector (of levels).

Usage

1

Arguments

x

Numeric vector to be rounded.

Value

Rounded numeric vector.

Note

At the time, this function can produce poor results when the relative variation in x is small.

Examples

1
2
3
4
5
## good
round_levels((1:3) / 10^5)
round_levels( 10 + (1:3) / 10^5)
## bad
round_levels( 10 + (1:3) / 10^6)

smint documentation built on April 14, 2017, 1:49 p.m.