countDecDigits: Number of digits after a decimal place

View source: R/countDecDigits.r

countDecDigitsR Documentation

Number of digits after a decimal place

Description

Count the number of digits after a decimal place. Note that trailing zeros will likely be ignored.

Usage

countDecDigits(x)

Arguments

x

Numeric or numeric vector.

Value

Integer.

Examples

countDecDigits(c(1, 1.1, 1.12, 1.123, 1.1234, -1, 0, 10.0000, 10.0010))

adamlilith/omnibus documentation built on May 3, 2024, 9:49 a.m.