I am trying to do a simple merge of two datasets using sqldf in R. The code line is as follows:
data_complete <- sqldf("SELECT df1.*, df2.*
FROM df1 LEFT JOIN df2
USING(ccn_number)")
I get the following error message: "Error: duplicate column name: zip5"
However, the variable zip5 is ONLY in df1, not df2, because I had already removed it from the latter, so there is no duplicate column name. I have tried some variations on the syntax, but continue getting the same error. I even tried deleting zip5 from a CSV version of df2 and then importing that, but still got the error. Any advice would be greatly appreciated, and thank you!