I was trying to merge two dataframes on two columns with the same name but different object types and different number of rows. They are both date data (i.e. "2015-03-17 00:00:00") and in the same format. One is of type double and the other is of type character.
I tried
merge(d1,d2,all=T,by.x=as.character(d1$Date))
merge(d1,d2,all=T,by.y=as.numeric(d1$Date))
merge(d1,d2,all=T,by="Date")
but none of them work (it's doing like a cartesian product). I am wondering what I did wrong and how to do it in correctly?