[R] > Understanding strip.default & strip.custom
p_connolly
p_connolly at slingshot.co.nz
Tue Jun 28 04:59:07 CEST 2016
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
More information about the R-help
mailing list