I'm trying to find the appropriate prices in dt for all values in vector a. It's so simple, yet I can't seem to figure it out. It should be a multiple merge...
a <- 1:10
min <- c( 0, 2, 4, 7)
max <- c(1, 3, 6, 10)
price <- c(2, 4, 6, 8)
dt <- data.frame(min = min, max = max, price=price)
This is the output I would like
