I never got deep into R as we had python or R as options in school for data projects so forgive me but where is the database join in this scenario?
R in this case fits the bill and even allows for some relational algebra here (e.g. INNER JOIN would be merge(X, Y, all=FALSE), LEFT OUTER JOIN: merge(X, Y, all.x=TRUE), etc...)