I would like to set the y axis limit of an xyplot using the object 'ylimit',
but receive this error:
[1] 990
Error in extend.limits(limitlist[[i]], axs = axs) :
   improper length of lim

I get the same error if I use ylim.

library(lattice)
trellis.device(col = FALSE, theme = lattice.getOption("col.whitebg"))
name <- "Variable name"
symbols <- c(1,2,3,4,5,6,7,8,9)
patientp <- c(1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9)
varp <-
c(826,119,168,90,572,323,122,10,42,900,250,180,120,650,400,130,12,33)
visitp <- c(1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3)
yall <- c(varp,varl,varm,varh)
ylimit <- max(yall)*1.1
xyplot(varp ~ visitp,
            xlab = "Visit",
            ylab = name,
            group = patientp,
            type = "b",
            lty = 1,
            as.table = TRUE,
            main = list("Placebo",cex = 1.0),
            scales = list(relation = "free",x = list(tick.number = 1,at =
c(1,3)),y = list(limits = ylimit)),
            auto.key = list(space = "right",cex = 1.1),
            par.settings = list(superpose.symbol = list(pch = symbols,cex =
1.1)))




-- 
Murray Pung
Statistician, Datapharm Australia Pty Ltd
0404 273 283

	[[alternative HTML version deleted]]

