I am trying to make a function of the type y = ax + b
that changes its arguments depending on the values taken by the "x" values. I therefore use the operator %in%
to detect whether "x" is in the required range of abscissa. There is one of those cases, which is here problematic, where the equation must work for abscissas ranging from negative (-1.02) to positive (0.08) values. I use :
as.character(0.07) %in% seq(from = -1.02, to = 0.08, by = 0.01)
FALSE
Unexpectedly, this gives me a FALSE result. When I try another x value, with a more restricted range of negative values, it now becomes TRUE :
as.character(0.07) %in% seq(from = -0.20, to = 0.08, by = 0.01)
TRUE
The same occurs whether I try for negative or positive "x" values. I have absolutely no clue for why this is happening. Worth mentioning I keep with the version "2022.07.2 Build 576" compatible with my windows 8.1 version.