Re: [R] panel.text question

2009-09-27 Thread Felix Andrews
Use packet.number() to identify which data subset you are dealing with (inside the panel function): xyplot(y~x|a, panel=function(...){ panel.loess(...) panel.text(0,2,label=c('best','better','bad','worst')[packet.number()]) }) There is also panel.number() which is similar but

Re: [R] panel.text question

2009-09-26 Thread Osman Al-Radi
Hello, Thanks for your suggestion. It works in my simplified example. However, it didn't work in my real code. It is probably because I neglected to include the group argument in the example. I apologize for that. Below is the real code, if you need the actual data I can include it too. # this w

Re: [R] panel.text question

2009-09-24 Thread Henrique Dallazuanna
Try this: xyplot(y ~ x | a, panel=function(x, y, subscripts, ...){ panel.loess(x, y) panel.text(0, 2, label=c('best','better','bad','worst')[tail(subscripts, 1)/100]) }) On Thu, Sep 24, 2009 at 2:45 PM, Osman Al-Radi wrote: > Dear R-help, > > I would like to add text to each