lookup table code

quick code to create lookup and merge with data.frame