[R] uncoerce.... to get real number instead of integer?

Petr Savicky savicky at cs.cas.cz
Sun Jun 24 11:31:24 CEST 2012


On Sun, Jun 24, 2012 at 07:29:23AM +0100, Rui Barradas wrote:
> Hello,
> 
> Don't worry, it's just a print thing. Just check this example:
> 
> 
> x <- 123456789.0378
> x
> [1] 123456789
> x - 123456789
> [1] 0.0378

Hello:

If you want to see more digits of the number, use one of the
following.

  print(x, digits=17)

  [1] 123456789.0378

  options(digits=17)
  x

  [1] 123456789.0378

The default setting of options("digits") is 7.

Hope this helps.

Petr Savicky.



More information about the R-help mailing list