fixed merge.r to handle data or metadata