Replace merge by dplyr's join functions