Beware: 2 is not always 2 in R
[This article was first published on Are you cereal? » R
, and kindly contributed to R-bloggers
]. (You can report issue about the content on this page here
Want to share your content on R-bloggers? click here
if you have a blog, or here
if you don't.
This post is minimalistic.
x <- 2.0000001
Now let’s have look at what’s inside x:
>  2
But is it really true?
>  FALSE
Here you go.
A colleague of mine was once ruined by this for an entire day before we realized what was going on.
So, how to find out what REALLY is the value of x?
>  "2.0000001"
If you got this far, why not subscribe for updates
from the site? Choose your flavor: e-mail
, or facebook