[R] question about boxplot axis

yyan liu zhliur at yahoo.com
Mon Jul 4 20:35:38 CEST 2005


Hi:
  I have a question making side by side boxplot. 
  My response is numeric and I want to make a side by
side boxplot of it accroding to a factor vector. So,
there are several boxplots on the same plot. Each
boxplot is with respect to one level for a factor. The
levels of
the factor are some characters. When I make the plot,
the boxplots are arranged according to the alphabetic
order of the levels. My question is that how I can
change the order the boxplots are arranged. For
example, 
 
   fac<-c("a","b","c","d")
   boxplot(time.vec~fac,xlab="Events",ylab="Time In
Days",col="yellow")

Then the boxplots are arranged in the order of
"a","b","c","d". But for some reason, I want it to be
"c","a","d","b". Any suggestion about this question?

thx a lot!

liu zhong




More information about the R-help mailing list