title: Matching Dates in R
body: <p>I have a data frame concerning the purchases of a shop owner. They don't happen on a daily basis. 
  It has two columns: the first one describes the <strong>date</strong>, the second one the <strong>quantity</strong> bought in that date.</p>
  
  <p>I would like to transform it into <strong>daily data</strong>, completing the original dataset, so I created a sequence:</p>
  
  <pre><code>a &lt;- seq(as.Date("2013/11/19"), as.Date("2017/04/22"), "days")
  </code></pre>
  
  <p>The first date corresponds to the one of the first purchase, and the second one of the last one, of the original dataset.</p>
  
  <p>The classes are both "<em>Date</em>".</p>
  
  <p>How can I <strong>merge</strong> the two dataset <em>by "date"</em>, even if, obviously, they have different rows length? I would like to have a dataframe with  <strong>daily</strong> "<strong>Date</strong>" as <strong>first</strong> <strong>column</strong>, and "<strong>Quantity</strong>" on the <strong>second</strong> <strong>one</strong>, with <strong>zeros</strong> where purchases didn't happen.</p>