title: apply making conversion (POSIXct)
body: <p>I was using apply on a data.frame with POSIXct objects. 
  The problem is that apply begins with converting the input data.frame as.matrix() (according to <a href="https://stat.ethz.ch/pipermail/r-help/2008-January/151172.html" rel="nofollow noreferrer">what I read</a>). Which means that POSIXct will then be casted to char. </p>
  
  <p>I solve my issue by using lapply instead. However is there some better solutions?</p>
  
  <pre><code>    # data.frame with one column of posixct
      pos = data.frame(dateTime = c(Sys.time(), Sys.time(), Sys.time()))
      str(pos) # POSIXct
  
      test = function(x){
        str(x[1])
        return(x)
      }                 
      res = data.frame(apply(pos, 2, test))
      str(res) # all strings
  
      res2 = data.frame(lapply(pos, test))
      str(res2) # all POSIXct
  </code></pre>