This is a simple wrapper for merge that adds a variable to the resulting data frame telling you where the source data was for that row (the X or Y data frame, with customizable choices for names).