Dear all,
I have a multiple data frames that I want to merge based on shared columns.
I found this easy way to merge various df by shared columns based on what I want:
`Reduce(function(x,y) merge(x = x, y = y, by = c("patient_id", "exam_date", "quality_R", "quality_L"), all.x = TRUE, suffixes = "x", "y", "z"), list(nmo_rfnl, nmo_gcipl, nmo_inl, nmo_elm, nmo_bm))
but some of the basal df's shared some columns names so when I check the results I obtained a lot of duplicate in the results regardless the suffixes. I was wondering if it is possible to assign an ending for some column for example: "_rfnl", "_gcipl" for each itineration.
I was thinking of changing all the columns names previously to the merge but then a merge by common names will not be possible.
Thanks!