I have a grouped and stacked stripchart() in R.
stripchart(gear ~ cyl, data=mtcars, method="stack")
cyl are the groups here. I want to groups ordered by its sum. From bottom to top the ordering should be 6, 4 and 8.
How can I do this automaticly in a stripchart?

As mentiont from Jota and with detailed help from How to order factors by condition in R?
Transforming
cylintofactorand order it's levels.