[R] ggplot: order of numeric factor levels?

2009-03-31 Thread Marianne Promberger
Hi, I'm having problems with qplot and the order of numeric factor levels. Factors with numeric levels show up in the order in which they appear in the data, not in the order of the levels (as far as I understand factors!) Here is a minimal example: library(ggplot2) y - c(-1,2,0,0,-2,-1) z -

Re: [R] ggplot: order of numeric factor levels?

2009-03-31 Thread hadley wickham
On Tue, Mar 31, 2009 at 5:01 PM, Marianne Promberger mprom...@psych.upenn.edu wrote: Hi, I'm having problems with qplot and the order of numeric factor levels. Factors with numeric levels show up in the order in which they appear in the data, not in the order of the levels (as far as I