Skip to content
Prev 295952 / 398503 Next

problems with xlim in plot.zoo() and window()

I'm trying to get a minimally intuitive way of plotting zoo objects
extracted for given periods of time

I do:
and get a  correct plot but the expression for xlim is hard to read by humans.
I try
[1] "2007-03-04 11:30:00 UTC" "2007-11-09 11:30:00 UTC"
Error in plot.window(...) : invalid 'xlim' value

an error that makes sense, but then I try:
[1] "2007-03-04" "2007-11-09"
and get no error but an empty plot.
How can I set xlim using a simple expression for given dates?

I've also tried with window(), but:
Warning messages:
1: In which(in.index & all.indexes >= start & all.indexes <= end) :
  Incompatible methods ("Ops.POSIXt", "Ops.Date") for ">="
2: In which(in.index & all.indexes >= start & all.indexes <= end) :
  Incompatible methods ("Ops.POSIXt", "Ops.Date") for "<="
?zoo? series (without observations)
?zoo? series (without observations)

Is this a problem with the way I've made the dates? (using as.POSIXct())

Data in http://dl.dropbox.com/u/3180464/alyL32007z.rda
http://dl.dropbox.com/u/3180464/alyL32007.rda
alyL32007z <- zoo(alyL32007[-1],alyL32007$time)

Agus