[R] chron and locales

Detlef Steuer Detlef.Steuer at unibw-hamburg.de
Thu Nov 14 15:19:16 CET 2002


(R-1.6.0 and chron 2.2, linux)

I have to work with date/time values from another LOCALE
on my machine. My normal locale is "de DE at euro" and 
the data I have to handle use AM/PM specifications for the times.

dstring <- "Nov 12 2001  4:31PM"

The problem now is, that  
strptime(dstring, "%b %d %Y %I:%M%p")
[1] "2001-11-12 04:31:00"

just ignores my times coming from another locale.

I have a workaroud (kind of) in setting my LANG enviroment to C
before starting R, but I hope for a better, more portable solution.
Any hints? 

detlef

"There is no way to peace, peace is the way." -- Ghandi

Detlef Steuer --- http://fawn.unibw-hamburg.de/steuer.html
***** Encrypted mail preferred *****
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list