decimal_places: Counts the number of digits to the right of the decimal

View source: R/math_funcs.R

decimal_placesR Documentation

Counts the number of digits to the right of the decimal

Description

Counts the number of digits to the right of the decimal place, ignoring any trailing zeroes.

Usage

decimal_places(x)

Arguments

x

A numeric vector

Value

An integer vector containing the number of digits to the right of the decimal for each element of x

Examples

## Not run: 
 decimal_places(c(0.11, 23.4, 185.8987, 0.1100))

## End(Not run)

tomhopper/numbr documentation built on Nov. 5, 2022, 11:35 p.m.