It's a vector of **length** 1, not **value** 1. In your case it gives the index (1 to 12) of the level being drawn in the panel, which is used to draw the strip according to other strip parameters, esp. style.
You seem to be making this way more difficult than you should. strip.default is the **function** being used to draw the strips in each panel. Generally speaking, you should not have to mess with arguments like which.panel and should probably use strip.custom() instead. Do carefully go through the examples in ?strip and ?xyplot. That may help. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Jun 27, 2016 at 7:59 PM, p_connolly <p_conno...@slingshot.co.nz> wrote: > I'm having difficulty following the help for those functions. > > My plot has a single conditioning factor with 12 levels. My > factor.levels in a call to strip.default looks like this: > > factor.levels = expression(Needles~ "::"~alpha -pinene, > Stems~ "::"~alpha -pinene, > Needles~ "::"~beta -pinene, > Stems~ "::"~beta -pinene, > Needles~ ":: B−Phellandrene", > Stems~ ":: B−Phellandrene", > Needles~ ":: Camphene", > Stems~ ":: Camphene", > Needles~ ":: Myrcene", > Stems~ ":: Myrcene", > Needles~ ":: Limonene", > Stems~ "::Limonene") > > Since there is only one factor, which.given must be 1. > Likewise, var.name must be of length 1. > > What I can't understand is the argument which.panel. The help says: > > which.panel: vector of integers as long as the number of conditioning > variables. The contents are indices specifying the current > levels of each of the conditioning variables (thus, this > would be unique for each distinct packet). This is identical > to the return value of ‘which.packet’, which is a more > accurate name. > > So, that must be of length 1 also, according to the first sentence, > but if I set it to 1, I get the first strip label repeated 12 times. > Set it to 2, I get the second one 12 times. Set it to 1:2, it > attempts to squash 2 strips in the space of 1, labelling the first > one. I don't understand the second sentence at all. > > What do I do to get all 12 in their correct order? > > I couldn't find an example remotely like what I'm trying to do. Are > there any pointers? > > TIA > Patrick > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.