[R] problem of "local" ! :-(
ggrothendieck at gmail.com
Mon Feb 16 23:16:56 CET 2009
The Date class does not work with times and neither it nor
the chron dates and times classes use time zones so
that cannot be the problem if you are using those classes.
Much of this is discussed in R News 4/1.
On Mon, Feb 16, 2009 at 4:05 PM, Suresh_FSFM <suresh.ghalsasi at gmail.com> wrote:
> Dear R- Experts,
> Seek your help.
> I created a time sequence using:
> x[i] <-chron(dates, tt, format=c(dates="y-m-d", tt="h:m:s"))
> first element in the list is displayed as: (09-01-01 00:00:00)
> Now, I want to store this value as date.
> If I use: format.Date(x,"%y-%m-%d %H:%M:%S"), I expect following value:
> "09-01-01 00:00:00"
> HOWEVER, the value displayed as: "09-01-01 01:00:00"
> I want to create time sequence starting from 00:00:00 !!!
> I realized that this is due to my "local" setting. I have GMT+1:00 setting.
> However, I do not want my local settings to affect my time sequence.
> Can someone please suggest me the solution?
> I do not want to change my local settings before I start R. Because that is
> not practical.
> View this message in context: http://www.nabble.com/problem-of-%22local%22-%21-%3A-%28-tp22045861p22045861.html
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help