[R] XYPlot Conditioning Variable in Specific, Non-Alphanumeric Order. -- Resending with corrected .txt file

Guy Jett GJett at itsi.com
Fri Apr 1 23:05:47 CEST 2011


Thank you very much Deepayan.  This does exactly what I needed!
Cheers,
Guy Jett
gjett at itsi.com

-----Original Message-----
From: Deepayan Sarkar [mailto:deepayan.sarkar at gmail.com] 
Sent: Friday, April 01, 2011 6:51 AM
To: Guy Jett
Cc: r-help at R-project.org
Subject: Re: [R] XYPlot Conditioning Variable in Specific, Non-Alphanumeric Order. -- Resending with corrected .txt file

<snip>
You need to specify the order of the levels explicitly (to override
the default). Here is how to do it for one, you can similarly do the
other:

> levels(df$Offset)
 [1] "T" "U" "V" "Y" "Z" "A" "B" "C" "D" "E" "F" "G" "H"
> df$Offset <- factor(df$Offset,
+                     levels = c("T", "U", "V", "Y", "Z", "A",
+                                "B", "C", "D", "E", "F", "G", "H"))
> levels(df$Offset)
 [1] "T" "U" "V" "Y" "Z" "A" "B" "C" "D" "E" "F" "G" "H"

Once you make these changes, your original call should work as desired.

-Deepayan


More information about the R-help mailing list