This feels like this should have a simple solution but it eludes me.
I have an existing set of data frames, called set1, set2, and set3. I want to merge each of them - separately - with another data frame, like so:
a <- merge(bigdata, set1, by = keyID)
b <- merge(bigdata, set2, by = keyID)
c <- merge(bigdata, set3, by = keyID)
...
I want to reference the existing 'sets' on the fly (in a loop), so I made this object:
nam <- paste('set', i, sep = '')
Of course, if I do this:
> nam
I get this:
> "set1"
But I want to use that "set1" reference to represent the apprpopriate data frame up in the merging code, not just an object of class "chr." Any help is, as always, appreciated.