title: R Date format with months and days of two digits
body: <p>I needed to turn character Date "2008-1-1" to numeric 20080101, but what I get is 200811, could anybody help me with this? Thank you very much. This is my code:</p>
  
  <pre><code>year &lt;- c(2008:2012)
  mth &lt;- c(1:5)  
  day &lt;- c(1:5) 
  A &lt;- data.frame(cbind(year,mth,day)) 
  date.ch &lt;- as.character(with(A, paste(year, mth, day, sep="-")))
  date.n &lt;- as.numeric(with(A, paste(year, mth, day, sep="")))
  </code></pre>