search for: decimalnumcount

Displaying 1 result from an estimated 1 matches for "decimalnumcount".

2012 Jul 07
5
number of decimal places in a number?
Dear R users, I need a function that gets a number and returns its number of actual decimal places. For example f(3.14) should return 2, f(3.142) should return 3, f(3.1400) should also return 2 and so on. Is such function already available in R? If not, could you give me a hint how to achieve that? Many thanks in advance. -----------------------------------------------------------------