Re: [R] Lattice: merged strips?

From: Mike Lawrence <Mike.Lawrence_at_dal.ca>
Date: Thu, 10 Jul 2008 12:14:39 -0300

As I understand it, Duncan MacKay's solution involves simply pasting the factors together, as in:

|_AX_|_AY_|_BX_|_BY_|

Which isn't quite as aesthetically pleasing as what I I'm looking for:

|___A___|___B___|
|_X_|_Y_|_X_|_Y_|

Any further suggestions?

Mike

On 10-Jul-08, at 2:43 AM, Duncan Mackay wrote:

> Mike
>
> see ?strip.custom and strip.default
>
> Basically you need to create a string of factor levels equal to the
> number of panels.
>
> Below is an example for a plot of 24 panels 4 columns and six rows.
> so that row 1 is:
>
> "2000 Summer" | "2000 Autumn" | "2000 Winter" | "2000 Spring"
> and so on for the remaining panel rows.
>
> strip = strip.custom(factor.levels = c(paste(rep(2000:2005, each
> = 4),
>
> rep(c("Summer","Autumn","Winter","Spring"),6), sep = " ") ),
>
> Use the xyplot layout argument to set up your layout properly to
> make it easier.
>
> If you want a 2 line strip then may be "\n" to break the paste into
> to 2 lines may do.
> There was post about ?6 weeks ago on it I think
>
> Regards
>
> Duncan Mackay
> Department of Agronomy and Soil Science
> University of New England
> ARMIDALE NSW 2351
> Email:
> home: mackay_at_northnet.com.au
>
>
>
> At 14:47 10/07/2008, you wrote:
>> Hi all,
>>
>> By default a call to xyplot from the Lattice package when using 2
>> factors [eg xyplot( dv~iv | XY * AB ) ] yields the following shingle
>> structure:
>>
>> |_A_|_A_|_B_|_B_|
>> |_X_|_Y_|_X_|_Y_|
>>
>> However, I'm wondering if it is possible to merge the upper shingle
>> within levels of that factor, as in:
>>
>> |___A___|___B___|
>> |_X_|_Y_|_X_|_Y_|
>>
>> Mike
>>
>> --
>> Mike Lawrence
>> Graduate Student, Department of Psychology, Dalhousie University
>>
>> www.memetic.ca
>>
>> "The road to wisdom? Well, it's plain and simple to express:
>> Err and err and err again, but less and less and less."
>> - Piet Hein
>>
>> ______________________________________________
>> R-help_at_r-project.org mailing list
>> 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_at_r-project.org mailing list
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. Received on Thu 10 Jul 2008 - 15:23:13 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 12 Jul 2008 - 00:31:44 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive