Skip to content
Back to formatted view

Raw Message

Message-ID: <20040212091218.GA4752@s1x.local>
Date: 2004-02-12T09:12:18Z
From: wolfram at fischer-zim.ch
Subject: lattice: showing panels for factor levels with no values

How to show panels for factor levels of conditioning variables
which do have no values?

E.g. there are panels for "Grand Rapids" when they have values:
	data( barley )
	with( barley, dotplot(variety ~ yield | year * site, layout=c(6,2) ) )

There are no panels for "Grand Rapids"
when there are no values for "Grand Rapids":
	my.barley <- subset( barley, ! ( site == "Grand Rapids" ) )
	with( my.barley, dotplot(variety ~ yield | year * site, layout=c(6,2) ) )

But there is a level "Grand Rapids":
	levels( my.barley$site )
	[1] "Grand Rapids"    "Duluth"
	[3] "University Farm" "Morris"         
	[5] "Crookston"       "Waseca" 

Is there an option to show empty panels for "Grand Rapids" in ``my.barley''?

Thanks. Wolfram