Replace subset calls with filter/select combination
Replace subset calls with with filter from dplyr
Replace merge() with inner_join() in those cases where id column names match
Correct typo