library(data.table) setDT(mydat) mydat[, tail(.SD, 1), PROB_POSTR_KM] # PROB_POSTR_KM a b # 1: 378884 7.8 69.5 # 2: 404136 8.0 70.0
2.1m questions
2.1m answers
60 comments
57.0k users