On 16.06.2010 08:59, David Croll wrote:>
>
> Hello R users,
>
>
> I am a bit puzzled by the fact that
>
> options(digits=22)
>
> x0<- 69880
> y0<- 26185
> x1<- 69600
> y1<- 22937
>
> number<- paste(x0,y0,x1,y1,sep="")
>
> number<- as.numeric(travel)
>
> print(number)
>
> gives number in scientific notation (some precision is wasted by having
> a "e+19" at the tail):
>
> 6.988026185696e+19
>
> but
>
> print(exp(log(number)))
>
> gives the full 20 digits of number (albeit with a certain error due to
> the log() and exp() transformation):
>
> 69880261856959807488
>
>
> How can I set print(number) to the normal notation instead of the
> scientific one, or at least improve the precision of the scientific
> notation?
See argument "scipen" in ?options.
Uwe Ligges
>
>
>
> Kind regards,
>
> David
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.