Sys.setenv(TZ="GMT") did the trick!  Thank you very much.  I'll continue 
to work the larger problem with this option.

Out of curiosity, however, can the following code be modified so that the 
replacement argument is informed by the month of x.1?:

index(y.1)<-as.POSIXct(gsub("(.*\\-).*(\\-.*)","\\101\\2",index(y.1))) 

Something to the tune of the following seems to work, but is it robust?:

txt<-paste("\\10",as.character(unique(month(index(x.1)))),"\\2",sep="")
index(y.1)<-as.POSIXct(gsub("(.*\\-).*(\\-.*)",txt,index(y.1))) 
index(y.1)
# "2004-01-04 01:15:00 PST" "2004-01-04 01:30:00 PST"
# "2004-01-04 01:45:00 PST" "2004-01-04 02:00:00 PST"
# "2004-01-04 02:30:00 PST" "2004-01-04 03:30:00 PST"

What would the gsub 'pattern' string be to replace the day, if I may ask? 
I'm not trying to push my luck, but the gsub approach is new to me and 
don't quite follow everything that is going on.

-Eric
        [[alternative HTML version deleted]]

______________________________________________
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