Learn R Programming

reflimR (version 1.0.6)

adjust_digits: Plausible rounding

Description

Rounds a quantitative laboratory result to a reasonable number of decimal places.

Usage

adjust_digits(x)

Value

List containing a rounded value of x and the number of decimal places

Arguments

x

numeric

Examples

Run this code
adjust_digits(0.001234)
adjust_digits(0)
adjust_digits(-12.34)
adjust_digits(5.4321)$digits

Run the code above in your browser using DataLab