[R] Date and lattice

Petr PIKAL petr.pikal at precheza.cz
Mon Nov 19 14:28:23 CET 2007


Dear all

I just encountered a strange behaviour trying to plot lattice xyplot with 
dates on x axis

 xyplot(rnorm(10)~seq(as.Date("2000/1/1"), by="month", 
length=10)|sample(1:2, 10, replace=T))

Warning message:
is.na() applied to non-(list or vector) in: is.na(x)

and no points were plotted.

If x is numeric everything is OK.

So my question is if lattice plotting can be done with Date or POSIX or 
other time related values as x axis.

W XP, R 2.6.0

BTW I will try it in 2.7.0 devel at home as it seems to me that in 2.7.0 
it worked.

Petr Pikal
petr.pikal at precheza.cz



More information about the R-help mailing list