2

Here is some output from r:

> (567.8 - floor(567.8)) * 10
[1] 8
> x <-(567.8 - floor(567.8)) * 10
> floor(x)
[1] 7

I would have though the last value would return 8, especially when floor(8) returns 8.

Any ideas why this is happening and how I can get around it?

Lennart Regebro
  • 167,292
  • 41
  • 224
  • 251
Josh
  • 307
  • 5
  • 10

0 Answers0