[R] Boxplot Help: Re-ordering the x-axis

Pamela Allen allen at zoology.ubc.ca
Thu Aug 17 20:46:41 CEST 2006

I am having a problem using boxlpot with my data.  I have my data arranged
in a data table, and two of my columns are "mass" and "month".  I am trying
to plot the mass of my study animals by month, thus I would like to have it
in the order of January to December.  The problem is that R orders each
month in alphabetical order, and gives each month an integer value
corresponding to this (i.e. April is integer=1, August=2, September=12).  I
have tried many different ways to solve this but nothing is working.  If
anyone knows how to order the x-axis in boxplot, or alternatively, re-assign
integer values to each month that would be very helpful.  Thank you in

Pamela Allen, MSc Candidate
University of British Columbia
Marine Mammal Research Unit, Fisheries Centre
Vancouver, B.C.  V6T 1Z4
allen at zoology.ubc.ca

More information about the R-help mailing list