Skip to content

x-axis (categorial variable) ordering with xyplot function (lattice package)

2 messages · BLASER Arnaud, Jim Lemon

#
On 07/25/2013 12:17 AM, BLASER Arnaud wrote:
Hi Arnaud,
If you want a non-alphabetic ordering of factors, you will have to 
explicitly specify the order:

country<-factor(
c("Austria","Belgium","Bulgaria","Czech Republic","United Kingdom"),
levels=c("Austria","Belgium","United Kingdom","Bulgaria",
"Czech Republic"))

Jim