[R] layout for xyplot

Jacques VESLOT jacques.veslot at cirad.fr
Wed Sep 22 16:32:08 CEST 2004


Dear all,

I tried to use layout argument in xyplot to get one panel per page.

I have a dataframe named 'data' with the following variables:

x, y = coords,
sub, bloc = 2-level factors,
etat = 5-level factor,


I did :

>   lset(theme = col.whitebg())
>   xyplot(y ~ x | bloc*sub , data=data, groups=etat,
+       layout=c(0,1,4),
+       main="Etat des plantes dans chaque bloc",
+       auto.key=list(columns=5, cex=.8),
+       scales=list(relation="free", draw=FALSE),
+       xlab="", ylab="",
+       ylim=list(c(52, 69), c(16, 33), c(35, 51), c(-1, 15)))


and received this error message :

Error in if (!any(cond.max.level - cond.current.level < 0) && (row - 1) *  :
        missing value where TRUE/FALSE needed

I tried some changes in arguments - notably layout=c(0,1), but anything
works.

Thanks for helping...

Jacques VESLOT
CIRAD Réunion




More information about the R-help mailing list