Skip to content
Back to formatted view

Raw Message

Message-ID: <1877700587.45690.1341651155240.JavaMail.apache@mail23.abv.bg>
Date: 2012-07-07T08:52:35Z
From: Martin Ivanov
Subject: 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.

-----------------------------------------------------------------
?????????? ??????????? ? ?????? ?? ??????????
http://www.sdi.bg/onlineInsurance/?utm_source=gbg&utm_medium=txtLink&utm_content=home