Skip to content

Problem on ploting of a zoo object

2 messages · Christofer Bogaso, Gabor Grothendieck

#
Hi,

Let say I have following codes

dat <- rnorm(100)
date1 <- 35886
dat2 <- zooreg(dat, as.Date(date1, origin="1900-01-01"), frequency=12)
index(dat2) <- format(index(dat2), "%m/%y")

However when I try to plot "dat2", I got following error :
Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
2: In min(x) : no non-missing arguments to min; returning Inf
3: In max(x) : no non-missing arguments to max; returning -Inf

Can anyone please tell me how to get the plot?

Thanks,
#
Warning message:
In diff(as.numeric(value)) : NAs introduced by coercion

In the last statement you've tried to assign the same time to every observation.
[1] "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98"
 [10] "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98"
 [19] "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98"
 [28] "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98"
 [37] "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98"
 [46] "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98"
 [55] "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98"
 [64] "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98"
 [73] "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98"
 [82] "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98"
 [91] "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98" "04/98"
[100] "04/98"
On Thu, Sep 24, 2009 at 3:18 PM, Bogaso <bogaso.christofer at gmail.com> wrote: