[R] lattice problem in R-1.9.0

Sundar Dorai-Raj sundar.dorai-raj at PDF.COM
Tue Apr 13 19:51:25 CEST 2004


Hi all,
   I just installed R-1.9.0 on Windows 2000 from binaries. Yesterday, on 
R-1.8.1 I ran a script that looked like:

library(lattice)
tmp <- expand.grid(A = 1:3, B = letters[1:2])
tmp$z <- runif(NROW(tmp))
trellis.device(png, file = "x1081.png", theme = col.whitebg)
xyplot(z ~ A | B, data = tmp,
        panel = function(x, y, i) {
          panel.xyplot(x, y)
          ltext(1, 0.95, paste("i =", i), adj = 0)
        },
        ylim = c(0, 1),
        i = 10)
dev.off()

In R-1.9.0, the same script gives the following error message:

Error in trellis.skeleton(cond = structure(list(B = 
structure(as.integer(c(1,  :
	Invalid value of index.cond

I've tracked it down to including the argument "i" to the panel 
function. If I change the argument to

xyplot(z ~ A | B, data = tmp,
        panel = function(x, y, I) {
          panel.xyplot(x, y)
          ltext(1, 0.95, paste("i =", I), adj = 0)
        },
        ylim = c(0, 1),
        I = 10)

all is copacetic. There is no argument in xyplot that starts with "i" so 
I don't know where the partial matching is occurring.

Thanks,
Sundar




More information about the R-help mailing list