title: merge two dataframe on columns with same name but different type in r?
body: <p>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 <em>double</em> and the other is of type <em>character</em>.</p>
  
  <p>I tried </p>
  
  <pre><code>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")
  </code></pre>
  
  <p>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? </p>