Re: [R] strip.custom() with more than one conditioning variable

2012-11-16 Thread Patrick Connolly
On Thu, 15-Nov-2012 at 07:29PM -0700, ilai wrote: | dotplot(variety ~ yield | year+ site, barley, | strip = function(...,which.given,factor.levels) { | if(which.given==2){ | strip.default(which.given,factor.levels=substr(levels(barley$site), 1, | 1),style=4,...) | } | else{ |

[R] strip.custom() with more than one conditioning variable

2012-11-15 Thread p_connolly
Suppose I wanted to plot the barley data like this: dotplot(variety ~ yield | year+ site, barley, strip = strip.custom(style = 4)) The factor levels are far too long for that to be useful. I can overcome that problem if I shorten the levels like this: dotplot(variety ~

Re: [R] strip.custom() with more than one conditioning variable

2012-11-15 Thread Duncan Mackay
Hi Patrick Not sure what you finally want to achieve but will this do? I have reduced the size of the text to make them readible dotplot(variety ~ yield | year+ site, barley, strip = strip.custom(which.given = 2, style = 4, factor.levels =

Re: [R] strip.custom() with more than one conditioning variable

2012-11-15 Thread p_connolly
Thanks Duncan, but it's of no use. It still leaves space for two strips and doesn't use the first one. I don't actually want a style = 4. I used it as an example of when a factor.levels vector might be wanted. In my case I want a vector of expressions which can't be made factor levels. If I

Re: [R] strip.custom() with more than one conditioning variable

2012-11-15 Thread ilai
dotplot(variety ~ yield | year+ site, barley, strip = function(...,which.given,factor.levels) { if(which.given==2){ strip.default(which.given,factor.levels=substr(levels(barley$site), 1, 1),style=4,...) } else{