Re: [R] lattice xyplot, get current level

2012-10-02 Thread David Winsemius
On Oct 2, 2012, at 3:59 AM, Christof Kluß wrote: > 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) { > pa

Re: [R] lattice xyplot, get current level

2012-10-02 Thread Bert Gunter
Christof: You are aware, I assume, that the subject level name can be incorporated into the strip label via the "strip" function argument; e.g. xyplot(..., strip = strip.custom(style = 1, strip.levels=c(TRUE,TRUE)), ...) Cheers, Bert On Tue, Oct 2, 2012 at 6:45 AM, Christof Kluß wrote: > subj

Re: [R] lattice xyplot, get current level

2012-10-02 Thread Christof Kluß
subj <- levels(subject) subj[panel.number()] seems to be a good solution is there something like panel.legend (instead of panel.text)? Am 02-10-2012 12:59, schrieb Christof Kluß: > Hi > > xyplot(y ~ x | subject) plots a separate graph of y against x for each > level of subject. But I would like

[R] lattice xyplot, get current level

2012-10-02 Thread Christof Kluß
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