getNDecimalsData: Get number of decimals based on the data in a numeric vector....

View source: R/decimals.R

getNDecimalsDataR Documentation

Get number of decimals based on the data in a numeric vector. Note: NA is returned if the element is missing (NA).

Description

Get number of decimals based on the data in a numeric vector. Note: NA is returned if the element is missing (NA).

Usage

getNDecimalsData(x)

Arguments

x

Numeric vector.

Value

Numeric vector of same length than x with the number of decimals.

Author(s)

Laure Cougnaud

See Also

Other decimals: formatPercentage(), getMaxNDecimals(), getMaxNDecimalsData(), getNDecimals()

Examples

x <- c(0.99, 5.679, 50.45, 1450)
getNDecimalsData(x)

inTextSummaryTable documentation built on June 22, 2024, 9:24 a.m.