I have a very basic question. I define a simple sequence:
numbers=seq(0.001,0.5,0.001)
now I want to know which element of this sequence has value 0.01, I tried this:
which(numbers==0.01)
but I just get
integer(0)
asking for the 10th elment gives me
numbers[10]
[1] 0.01
But
numbers[10]==0.01
[1] FALSE
Can it have something to do with the places behind the decimal point? How can I get the element (here:10), that matches a certain value? (here: 0.1)?
Thank you.