0

Can anyone tell me why I'm getting FALSE?

> 2074.49*10^3 == 2074490
[1] FALSE

Can you also advise me better ways to check the equality?

user4143385
  • 51
  • 1
  • 6
  • `> 0.3 - 0.2 == 0.2 -0.1 [1] FALSE` – Psidom May 15 '16 at 00:27
  • "Can you also advise me better ways to check the equality?" -> `all.equal(2074.49*10^3, 2074490)` or rather `isTRUE(all.equal(2074.49*10^3, 2074490))`. The latter prevents a verbose output if the numbers are not equal within the limits of floating-point accuracy. – RHertel May 15 '16 at 00:37

0 Answers0