The factor order defaults to alphabetical, and boxplot follows that.
Re-ordering the factor to the order of interest is probably the best way
of handling it.
However, if you don;t want to do that, you could perhaps also use the
at= parameter in boxplot. For example
x-rnorm(50)
want.
HTH ...
Peter Alspach
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tubin
Sent: Thursday, 1 May 2008 6:40 a.m.
To: r-help@r-project.org
Subject: [R] ordering a factor in boxplot output
I'm sure I'm missing something obvious
I'm sure I'm missing something obvious in the documentation...
I'm generating a boxplot
boxplot(CleanValue~ApptCategory*ReportingCode,data=newfile)
where ApptCategory is a factor with possible values (New,Established)
Problem is, the output orders those factors alphabetically, and I'd really
Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tubin
Sent: Thursday, 1 May 2008 6:40 a.m.
To: r-help@r-project.org
Subject: [R] ordering a factor in boxplot output
I'm sure I'm missing something obvious in the documentation...
I'm generating a boxplot
4 matches
Mail list logo