title: R format date with time stamp
body: <p>I would like to convert the following dates</p>
  
  <pre><code>dates &lt;-c(1149318000L, 1151910000L, 1154588400L, 1157266800L, 1159858800L, 1162540800L)
  </code></pre>
  
  <p>into date and time format</p>
  
  <p>I don't know the origin of the date but I know that</p>
  
  <blockquote>
    <p>1146685218 = 2006/05/03 07:00:00</p>
  </blockquote>
  
  <p>** Update 1 **</p>
  
  <p>I have sorted the unformatted dates and replace the sample above with a friendly sequence but I have real dates. I was thinking of using the the above key as origin, but It does not seem to work. </p>
  
  <p>let</p>
  
  <pre><code> seconds_in_days  &lt;- 3600*24
  </code></pre>
  
  <blockquote>
    <p>(dates[2]-dates[1])/seconds_in_days</p>
  
  <pre><code>## [1] 30
  </code></pre>
  </blockquote>