I played with the merge team in R and am trying to figure out how to use the SUFFIX parameter. The online documentation is not a good job to explain this.
What I would like to do is import some csv files:
data1<-read.csv("fileA", header=T)
data2<-read.csv("fileB", header=T)
And then use the merge command to combine them. However, I would like some variables to be truly concatenated, and other variables that contain the same name should be marked with the file from which they were derived. For example, if the variable "NAME" existed in both my tables, I would like them to be joined as usual, but if the variable "GRADE" appeared, it would be changed to GRADE.fileA and GRADE.fileB. I can already get GRADE.x and GRADE.y, but I would prefer more useful labels for these variables. Any help on this would be greatly appreciated. Thank.
Brian source
share