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
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
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
3 matches
Mail list logo