Skip to contents

Count the number of decimal places

Usage

ndecimal(num)

Arguments

num

a numeric value

Examples

#example 1
ndecimal(9.000322)
#> [1] 6

#example 2
ndecimal(34)
#> [1] 0

#example 3
ndecimal(45.)
#> [1] 0