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{
strip.default(which.given=which.given,factor.levels=factor.levels,style=3,...) } } ) Cheers On Thu, Nov 15, 2012 at 5:18 PM, <p_conno...@slingshot.co.nz> wrote: > 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 didn't need to show two conditioning variables, > I'd have no problem. > > I need to work out how which.given is meant to be used. It doesn't > make sense to use it the way I have and I'll desist as soon as I find > out how to use it properly. > > > best > Patrick > > > Quoting Duncan Mackay <mac...@northnet.com.au>: > > 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 = paste(levels(barley$year), >> substring(levels(barley$site), 1, 1)), >> par.strip.text = list(cex = 0.75)) >> ) >> >> > ______________________________**________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help> > PLEASE do read the posting guide http://www.R-project.org/** > posting-guide.html <http://www.R-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@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.