That is a good tip. I have tried it and found that it works if I make sure it was converted to character first. strptime appears to accept factor variables which is the default when reading in the file originally.

Thanks
Steve

On 3/29/2012 2:31 PM, MacQueen, Don wrote:
I also find that POSIXct is generally the most useful, and only use
POSIXlt in special cases.

But have you considered as.POSIXct() instead of strptime()? It works for
me, and I can't remember the last time I had to use strptime() for
converting character to date/time. (But I mostly don't work with multiple
time zones, except for converting to/from UTC.

-Don


______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to