Re: [R] Zoo changing time-zone when I merge 2 zoo time series

2018-07-19 Thread Enrico Schumann
On Mon, 09 Jul 2018, Christofer Bogaso writes: > Hi, > > Below is my code : > > library(zoo) > Dat1 = structure(c(17890, 17770.01, 17600, 17593, 17630.01), index = > structure(c(1512664740, > 1512664800, 1512664860, 1512664920, 1512664980), class = c("POSIXct", > "POSIXt"), tzone =

Re: [R] Zoo changing time-zone when I merge 2 zoo time series

2018-07-09 Thread Christofer Bogaso
My default is set as GMT. On Mon, Jul 9, 2018 at 4:01 PM David Wolfskill wrote: > On Mon, Jul 09, 2018 at 03:52:02PM +0530, Christofer Bogaso wrote: > > Hi, > > > > Below is my code : > > > > library(zoo) > > Dat1 = structure(c(17890, 17770.01, 17600, 17593, 17630.01), index = > >

Re: [R] Zoo changing time-zone when I merge 2 zoo time series

2018-07-09 Thread Eric Berger
I found the following at https://stackoverflow.com/questions/25269425/merge-zoo-removes-time-zone library(xts) merge2=function(x,y) { as.zoo(merge(as.xts(x), as.xts(y)))} If you define the function merge2() as above then merge2(Dat1,Dat2) should be ok HTH, Eric On Mon, Jul 9, 2018 at

[R] Zoo changing time-zone when I merge 2 zoo time series

2018-07-09 Thread Christofer Bogaso
Hi, Below is my code : library(zoo) Dat1 = structure(c(17890, 17770.01, 17600, 17593, 17630.01), index = structure(c(1512664740, 1512664800, 1512664860, 1512664920, 1512664980), class = c("POSIXct", "POSIXt"), tzone = "America/Los_Angeles"), class = "zoo") Dat2 = structure(c(15804.28, 15720.61,