[R] Increase Number of Decimals

Charilaos Skiadas cskiadas at gmail.com
Wed Jun 11 19:11:00 CEST 2008


On Jun 11, 2008, at 12:17 PM, Neil Gupta wrote:

> R Users,
>
> I'm new to R and was wondering how I can show more decimal places  
> when I run
> commands. If I'm simply running a correlation(ES,YM) how would I  
> increase
> the number of decimal places R shows? When I run this it shows me . 
> 9734044.
> How can I extend this further?

I am not sure what you can gain by looking at more decimal points in  
a correlation, but there are two ways, as far as I can tell:

1) Wrap the command in "print", and use the digits optional argument  
in print. Have a look at ?print for details
2) Change the default more permanently for the session, by something  
like
options(digits=10)
Look at ?options for details

> In addition I was running histograms on high frequency data to check a
> Spread. The spread moves at an extremely granular level. It may  
> move .000001
> frequently but again at a low level. How  can I increase the  
> graularity of
> the histogram plots to detect smaller moves?

We would need a reproducible example for this, I think.

> I appreciate any and all help.
>
> Neil

Haris Skiadas
Department of Mathematics and Computer Science
Hanover College



More information about the R-help mailing list