nonZeroRound: Non-Zero Rounding

View source: R/utils-numeric.R

nonZeroRoundR Documentation

Non-Zero Rounding

Description

This function will recursively attempt to round a value to greater and greater precision until it results in a non-zero value. One consequence of this is that the precision of the output value may not be exactly what was requested.

Usage

nonZeroRound(x, digits)

Arguments

x

Numeric value to round

digits

Number indicating the desired precision

Value

number rounded as nearly to the requested precision as possible without returning zero.


VEuPathDB/veupathUtils documentation built on Feb. 8, 2025, 12:29 p.m.