[R] lattice xyplot, get current level

Christof Kluß ckluss at email.uni-kiel.de
Tue Oct 2 12:59:19 CEST 2012


Hi

xyplot(y ~ x | subject) plots a separate graph of y against x for each
level of subject. But I would like to have an own function for each
level. Something like

xyplot(y ~ x | subject,
       panel = function(x,y) {
         panel.xyplot(x,y)

         panel.curve(x,y) {
           # something that dependents on the current subject
           ...
         }
       })


How I get the current subject? (The current subject is the title of the
graph, too)

thx
Christof



More information about the R-help mailing list