[R] question about boxplot axis

From: yyan liu <zhliur_at_yahoo.com>
Date: Tue 05 Jul 2005 - 04:35:38 EST


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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Jul 05 04:42:00 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:12 EST