Skip to contents

Return the number of decimal places in a given value

Usage

decimal_places(x)

Arguments

x

The value for which the number of decimal places will be returned.

Value

An integer representing the number of decimal places in x.

Examples

decimal_places(4.56)
#> [1] 2