[R] How many digits are there in left of dot of 0.0001 ?

Hasan Diwan hasan.diwan at gmail.com
Thu Feb 26 03:54:57 CET 2015


Ahh... The exponent of your number in scientific notation, which you can
obtain using:

format(a.number, scientific=TRUE)

Hope that helps.. -- H

On 25 February 2015 at 18:43, ce <zadig_1 at excite.com> wrote:

>
> Sorry I meant right. I want to do it R of course. result should be 4
> naturally. On the left answer I want would be 1 ,
>
> -----Original Message-----
> From: "Hasan Diwan" [hasan.diwan at gmail.com]
> Date: 02/25/2015 09:28 PM
> To: "R Project Help" <r-help at r-project.org>
> Subject: Re: [R] How many digits are there in left of dot of 0.0001 ?
>
> On 25 February 2015 at 17:55, ce <zadig_1 at excite.com> wrote:
>
> > Dear all,
> >
> > I would like to count how many digits are there on the left of a the dot
> > of a numeric variable
> >
>
> Left? An infinite number... What does this have to do with R, though? -- H
>
> >
> > a=0.0001
> >
> > thanks
> >
> > ______________________________________________
> > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
>
>
> --
> OpenPGP: https://hasan.d8u.us/gpg.key
> Sent from my mobile device
> Envoyé de mon portable
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code
>



-- 
OpenPGP: https://hasan.d8u.us/gpg.key
Sent from my mobile device
Envoyé de mon portable

	[[alternative HTML version deleted]]



More information about the R-help mailing list