round_levels: Round a vector (of levels)

View source: R/miscUtils.R

round_levelsR Documentation

Round a vector (of levels)

Description

Round a vector (of levels).

Usage

round_levels(x)

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

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

IRSN/smint documentation built on Dec. 9, 2023, 9:53 p.m.