Hello,
I have been playing around with the merge command in R and am trying to figure out how to use the SUFFIX parameter. The online documentation does not do a very good job at explaining it.
What I'd 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 merge them. However, I would like for some variables to be truly merged, while other variables that hold the same name to be labeled by the file they came from. So for instance, if a "NAME" variable existed in both of my spreadsheets, then I'd like for them to be merged as normal, but if a "GRADE" variable showed up, it would be changed to GRADE.fileA and GRADE.fileB. I am already able to get GRADE.x and GRADE.y, but I would prefer more useful labels on these variables. Any help on this would be appreciated. Thank you.