title: How do I convert date to number of days in R
body: <p>How do I convert date to number of days, starting from the first day of the year.</p>
  
  <p>How do I convert the following to the expected result below?</p>
  
  <pre><code>   Date               
  02/01/2000         
  20/02/2000         
  12/12/2000         
  13/01/2001   
  </code></pre>
  
  <p>Below is expected result.</p>
  
  <pre><code>Date               NumDays  TotalDays
  02/01/2000          1          1
  20/02/2000          51         51
  12/12/2000          346        346
  13/01/2001          13         379
  </code></pre>