Re: [R] problems with xlim in plot.zoo() and window()

2012-05-29 Thread Agustin Lobo
Thanks! Using as.POSIXct() instead of as.Date() solves the problem: > plot(alyL32007z$NEE_st,col=cod,type="b",pch=18,xlim=as.POSIXct(c("2007-03-04 > 11:30:00 UTC" ,"2007-11-09 11:30:00 UTC"))) #works fine > delme <- window(alyL32007z, start = > as.POSIXct("2007-03-04",tz="UTC"),end=as.POSIXct("20

Re: [R] problems with xlim in plot.zoo() and window()

2012-05-29 Thread Gabor Grothendieck
On Tue, May 29, 2012 at 1:39 PM, Agustin Lobo wrote: > Thanks! > Using as.POSIXct() instead of as.Date() solves the problem: >> plot(alyL32007z$NEE_st,col=cod,type="b",pch=18,xlim=as.POSIXct(c("2007-03-04 >> 11:30:00 UTC" ,"2007-11-09 11:30:00 UTC"))) #works fine >> delme <- window(alyL32007z, st

Re: [R] problems with xlim in plot.zoo() and window()

2012-05-29 Thread Gabor Grothendieck
On Tue, May 29, 2012 at 11:47 AM, Agustin Lobo wrote: > I'm trying to get a minimally intuitive way of plotting zoo objects > extracted for given periods of time > > I do: >> plot(alyL32007z$NEE_st,col=cod,type="b",pch=18,xlim=time(alyL32007z)[c(3000,15000)]) > > and get a  correct plot but the ex

[R] problems with xlim in plot.zoo() and window()

2012-05-29 Thread Agustin Lobo
I'm trying to get a minimally intuitive way of plotting zoo objects extracted for given periods of time I do: > plot(alyL32007z$NEE_st,col=cod,type="b",pch=18,xlim=time(alyL32007z)[c(3000,15000)]) and get a correct plot but the expression for xlim is hard to read by humans. I try > time(alyL3200