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

From: Guy Jett <GJett_at_itsi.com>
Date: Fri, 01 Apr 2011 21:05:47 +0000

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



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 01 Apr 2011 - 21:08:30 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 01 Apr 2011 - 21:50:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive