Re: [R] override date in xts time series

2012-11-03 Thread Eric Morway
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("(.*\\-).*(\\-.*)","

Re: [R] override date in xts time series

2012-11-03 Thread Eric Morway
Hello Arun, I too am using R 2.15 and am unable to get the same result as you. You will notice in the R code that follows that when I use 'update' the time in the xts object goes haywire. For example, "2004-04-04 01:15:00 EST" gets converted to "2004-01-03 22:15:00 PST" (see below). Because

Re: [R] override date in xts time series

2012-11-02 Thread Eric Morway
th=unique(month(index(xs[[i]][2:3] #Warning message: #In NextMethod(.Generic) : # number of items to replace is not a multiple of replacement length While there was a warning, there was no error, so I'm surprised that the index wasn't updated? xs[[j]][2:3] # x

[R] override date in xts time series

2012-11-02 Thread Eric Morway
Using the following bit of R, I'm wondering if there is a way to override/manipulate/replace the date in one xts time series with the date of another xts time series while not affecting/changing the times of the xts time series? library(xts) x.Date <- rep("1/1/2004",times=