Could anyone help to explain me this issue. I have 2 dataframes: mail_sent:1901 rows and client_return_race: 1663 rows. I want to merge these dataframes together and all rows in mail_sent should be show.
These 2 dataframes have 3 same column: CLIENT_ID, CAMPAIGN_NAME, TIME. I want to merge 2 dataframes based on 3 same columns above. The below is my code.
The code runs well however, the result of merging (mail_race) is 1663 not 1901. I expect it should show 1901 rows because I mentioned all.mail_sent=all/ all.mail_sent=TRUE in the code. It seems that the merge is inner join not outer join.
mail_race<-merge(mail_sent,client_return_race,by.mail_sent=c("CLIENT_ID","CAMPAIGN_NAME","TIME"),
by.client_return_race=c("CLIENT_ID","CAMPAIGN_NAME","TIME")
,all.mail_sent=TRUE)