[R] Date and lattice

Dieter Menne dieter.menne at menne-biomed.de
Mon Nov 19 15:38:26 CET 2007

Petr PIKAL <petr.pikal <at> precheza.cz> writes:

> 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.

Your example and my attempt to understand what it means works for me:
R 2.6.0, Windows 2000 english, german date settings. Could it be a problem with
cz date settings?

df = data.frame(val=rnorm(10),
                dt=seq(as.Date("2000/1/1"), by="month", length=10),
                group=sample(1:2, 10, replace=T))


More information about the R-help mailing list