I wonder if there is a better way to put two data.frames into one, treating the rownames as if it was a column and then merge by this column with some other data.frame. I know I could do the following
df1$rn <- row(df1)
all <- merge(df1,df2, by.x="rn", by.y="some_column")
I mean this produces redundant data (rownames as column) which is not needed at all. So what´s the smarter way to do it?