Dear R-help,

I would like to add text to each of four panels in a plot generated by
xyplot in lattice library. A sample code is given below, the plot generated
has the first label repeated in all panels!

How can I get the labels to be different in each panel?

library(lattice)
x <- rnorm(400)
y <- rnorm(400)
a <- gl(4, 100)

xyplot(y~x|a,
    panel=function(...){
        panel.loess(...)
        panel.text(0,2,label=c('best','better','bad','worst'))})

Thanks

Osman



Osman O. Al-Radi, MD, MSc, FRCSC
Staff Cardiovascular Surgeon
Co-medical director, Tissue Bank
The Hospital for Sick Children
University of Toronto, Canada

	[[alternative HTML version deleted]]


