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{
|
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 ~
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 =
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
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{
5 matches
Mail list logo