#RStats #Rprogramming Does anyone know why the below comparisons fail to return TRUE in R? x = seq(from = 0, to = 1, by = 0.05) # the following seem to fail (at least in R 4.2.1) x[4] == 0.15 x[7] == 0.30 identical(x[4], 0.15) # but this one works all.equal(x[4], 0.15)
4
2
2
That would another (somewhat compliated by extra structure overlayed) entry for R FAQ 7.31 cran.r-project.org/doc/FAQ/R…
1
4
@eddelbuettel Dirk, thanks a lot for the FAQ link
1
1
Replying to @GastonStat
It is a rite of passage. Program sufficiently much with #rstats and you will most likely fall into an 'R FAQ 7.31'-shaped hole. Holds with other programming languages too, unless you operate symbolically.

Nov 12, 2022 · 4:14 PM UTC

1
1
4
It's a deep hole for non-CS folks, too.
1
1
Indeed. And perhaps the worst part is the frustration and headaches experienced by my students, who for the most part are non-CS folks.
1
1