Thanks for the reply AK. >From R FAQ 7.31: "The only numbers that can be represented exactly in R's numeric type are integers and fractions whose denominator is a power of 2"
I'm not sure though that this is the problem here, does this statement apply to only floating point numbers? Is 0.15 a floating point number? Also the dummy code I provided above works for 0.1, which is 1/10, but not 0.15, which is 3/20, yet neither of these fractions has a denominator that is a power of 2, of if FAQ 7.31 is to be read literally, neither of these fractions can be accurately represented yet one still works in the test. I will cast the vector to character and go on from there - but it would be great if I could understand this a bit more. Cheers, Dave -- View this message in context: http://r.789695.n4.nabble.com/Returning-index-of-vector-element-matching-specific-value-tp4659952p4659955.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.