
Kaley W. answered 05/28/19
B.S. Computer Science Graduate
The merge() function, for the purposes of this question, does the same thing as the cbind() function: combines the data frames side by side. So you are correct that you want to use rbind(), which combines data frames one on top of the other. The error you receive when running rbind() is "names do not match previous names." This is because rbind() cannot be called on data frames whose column names do not match. df has column names "hello", "goodbye" while de has the default column names based on its contents: "X.hola", "X.ciao". We can fix the error by changing de's column names: names(de)<-names(df). This assigns df's column names to de. Now that df and de have the same column names, rbind(df, de) should execute without error.