[Rd] as.POSIXct behaviour
Suzen, Mehmet
msuzen at gmail.com
Thu Mar 9 08:05:03 CET 2017
On 9 March 2017 at 01:29, Arunkumar Srinivasan
<arunkumar.sriniv at gmail.com> wrote:
> The time info is lost on the first index as well. And it happens *silently*.
Yes, because it assumes homogeneous format on the entire vector. You
may want to
do two passes with different formats or run a regular expression to
catch typos.
> lapply(x, as.POSIXct)
> A list is returned, but values are as I’d expect. Would it be possible
> to retain the time info with as.POSIXct(x) directly as well? If not,
This behaves differently because you are running as.POSIXct for each element
separately.
More information about the R-devel
mailing list