I have run into the same problem as described at R which () function returns integer(0)
price = seq(4,7, by=0.0025) allPrices = as.data.frame(price) lookupP
You could also try rounding the prices in your data frame to 4 decimal places:
which(round(allPrices$price, digits=4) == lookupPrice) [1] 425
After rounding to 4 places, the precision of the lookupPrice and your data frame of prices should match.
lookupPrice
Demo