title: Converting Integers to Date in R
body: <p>I want to convert my integer column to Date. the integer number looks like this (20160101). When using the as.Date function and by typing the origin argument to be "2016-01-02" the generate new column has the following value which is wrong "55197-07-06". So it has nothing to do with the write value. What could be the mistake I tried so many codes and this is one of them: </p>
  
  <pre><code>data$newVar = as.Date(data$YearMonthDay, origin="2016-01-02")
  </code></pre>
  
  <p>Also, my dates are all in 2016 year so I want to format the date to include only the month and day. </p>