1

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
  • 158,668
  • 41
  • 218
  • 248
Josh
  • 197
  • 3
  • 10

0 Answers0