This is a seemingly simple R question, but I don\'t see an exact answer here. I have a data frame (alldata) that looks like this:
Case zip market 1
Another option that worked for me and is very simple:
alldata$market<-with(zipcodes, market[match(alldata$zip, zip)])