While writing the following code in R:
seq1 <- seq(from = 0.05, to = 0.5, by = 0.05)
and then running the following code:
seq1 == 0.15
I get the following output:
FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
When ideally I should be getting:
FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
The funny thing is if I say:
seq1 == (0.1+0.05)
Then I get the desired output:
FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
What could be the problem?