title: Convert Unix timestamp into datetime
body: <p>I have the following data frame</p>
  
  <pre><code>&gt; head(try)
       creates       time
  1  128.29508 1417392072
  3  236.98361 1417392072
  7   98.45902 1417392072
  9  157.44068 1417392131
  10 227.38333 1417392131
  11 242.03390 1417392131
  
  &gt; str(try)
  'data.frame':   102968 obs. of  2 variables:
   $ creates: num  128.3 237 98.5 157.4 227.4 ...
   $ time   : Factor w/ 26418 levels "1417392071","1417392072",..: 2 2 2 3 3 3 3 3 5 5 ...
  </code></pre>
  
  <p>I am unable to convert the UNIX timestamp into datetime using the following methods I tried</p>
  
  <pre><code>&gt; head(as.POSIXlt(as.numeric(try$time),origin="1970-01-01",tz="GMT"))
  [1] "1970-01-01 00:00:02 UTC" "1970-01-01 00:00:02 UTC" "1970-01-01 00:00:02 UTC" "1970-01-01 00:00:03 UTC" "1970-01-01 00:00:03 UTC"
  [6] "1970-01-01 00:00:03 UTC"
  
  &gt; head(as.POSIXct(as.character(try$time),tz="GMT"))
  </code></pre>
  
  <blockquote>
    <p>Error in as.POSIXlt.character(x, tz, ...) : 
          character string is not in a standard unambiguous format</p>
  </blockquote>
  
  <pre><code>&gt; head(as.POSIXlt(as.POSIXct(as.vector(as.numeric(try$time)),origin="1970-01-01")))
  [1] "1970-01-01 00:00:02 UTC" "1970-01-01 00:00:02 UTC" "1970-01-01 00:00:02 UTC" "1970-01-01 00:00:03 UTC" "1970-01-01 00:00:03 UTC"
  [6] "1970-01-01 00:00:03 UTC"
  </code></pre>
  
  <p>I'm not sure what I'm doing incorrectly here.</p>