If i understand you correctly, you want a lookup for a number in the value column given numbers for the first two columns
Here's one way using a simple data.frame and a loop-up function
dd<-data.frame(
col_1 = c(8521, 8521, 1112074),
col_2 = c(13394, 14353, 1112073),
value = c(24,15,52)
)
getval<-function(c1,c2, data=dd) {
data$value[data$col_1==c1 & data$col_2==c2]
}
getval(8521, 14353)
# [1] 15
Unfortunately this procedure isn't very fast. If you plan to do this often, you might consider using the data.table library which allows you to index your table for faster look-up
library(data.table)
dt<-data.table(
col_1 = c(8521, 8521, 1112074),
col_2 = c(13394, 14353, 1112073),
value = c(24,15,52)
)
setkey(dt, col_1, col_2)
getval<-function(c1,c2, data=dt) {
dt[.(c1,c2)][, value]
}
getval(8521, 14353)
# [1] 15