From: Steven Lacey <slacey_at_umich.edu>

Date: Sat 07 Jan 2006 - 03:20:13 EST

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Jan 07 03:27:19 2006

Date: Sat 07 Jan 2006 - 03:20:13 EST

Hi,

I am creating a multi-conditioned trellis plot. My data look something like this:

Factor A Factor B IV DV

X 1 X 2 X 3 X 4 Y 1 Y 2 Y 3 Y 5 Z 1 Z 2 Z 3 Z 4

In one sense these data are suitable for trellis because for every level of factor A there are four levels of factor B. However, the names of the factor B levels depend on the level of factor A.

How would I create a 3 x 4 trellis plot where each panel is a combination of factor A and factor B where the names of factor B are preserved and the strip has two levels, one for factor A and another for factor B?

This was more difficult than I thought because trellis wants to generate 15 panels, as there are 3 levels of factor A and 5 levels of factor B. But these 5 levels of factor B are in name only. There are only 4 different levels of factor B for each level of factor A.

As a work around I am considering renaming the levels in factor A from 1 to 4 for all levels of factor B. Then, write a custom strip.default to specify the names. However, I am not sure how to write this function. Would someone help me get started?

Thanks,

Steve

[[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Jan 07 03:27:19 2006

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:41:54 EST
*