Using match function in R to match variables in two files