I have a simple boxplot, showing the distribution of a score for factor TYPE:
myDataFrame = data.frame( TYPE=c(\"a\",\"a\",\"b\",\"b\",\"c\",\"c\"), SCORE=c(
This is a job for reorder():
myDataFrame$TYPE <- with(myDataFrame, reorder(TYPE, SCORE, mean)) boxplot( SCORE~TYPE, data=myDataFrame )