title: Combine date as integer and time as factor to POSIXct in R
body: <p>I know this has been asked several times and I looked at the questions and followed the suggestions. However, I couldn't solve this one. </p>
  
  <p>The datetime.csv can be found on <a href="https://www.dropbox.com/s/6bvhk4kei4pg8zq/datetime.csv" rel="nofollow noreferrer">https://www.dropbox.com/s/6bvhk4kei4pg8zq/datetime.csv</a></p>
  
  <p>My code looks like:</p>
  
  <pre><code>jd1 &lt;- read.csv("datetime.csv")
  head(jd1)
        Date Time
  1 20100101 0:00
  2 20100101 1:00
  3 20100101 2:00
  4 20100101 3:00
  5 20100101 4:00
  6 20100101 5:00
  
  sapply(jd1,class)
  &gt; sapply(jd1,class)
       Date      Time 
  "integer"  "factor"
  
  jd1 &lt;- transform(jd1, timestamp=format(as.POSIXct(paste(Date, Time)), "%Y%m%d %H:%M:%S"))
  Error in as.POSIXlt.character(x, tz, ...) : 
  character string is not in a standard unambiguous format
  </code></pre>
  
  <p>I tried the solution suggested by rcs on <a href="https://stackoverflow.com/questions/14359546/converting-two-columns-of-date-and-time-data-to-one">Converting two columns of date and time data to one</a> but this seems to give an error. </p>
  
  <p>Any help is highly appreciated. </p>
  
  <p>Thanks. </p>