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
There is a function near in dplyr:
near
dplyr
near(x, y, tol = .Machine$double.eps^0.5)
For this case, you can try:
which(near(allPrices$price, lookupPrice)) #[1] 425