0

I’m transforming a continuous variable in a binary variable by assigning 0 to a value higher than -5 and 1 for a value <= -5. I found a difference by doing that in excel and R, in excel 14.4-19.4 <= -5 returns TRUE, while in R it returns FALSE. In R, I tried also 14.5-19.5==-5 and it returns FALSE. What's the reason? I use R version 4.1.3 in RStudio.

user438383
  • 5,716
  • 8
  • 28
  • 43

0 Answers0