Message-ID: <alpine.LNX.2.00.1302221430200.2597@salmo.appl-ecosys.com>
Date: 2013-02-22T22:33:19Z
From: Rich Shepard
Subject: Controlling Order of Panels in Lattice Trellis Plots
In-Reply-To: <CACk-te1j0=dJ3AsRfxwbnu4_-VesTNW7-qr1HdZRC6POrKp7yA@mail.gmail.com>
On Fri, 22 Feb 2013, Bert Gunter wrote:
> You do not need to use ordered factors.
> newfac <- factor(oldfac, lev= ...) ## will do it. e.g.
>
>> x <- factor(letters[1:3]) ## default ordering is alphabetic (mod locale)
>> x
> [1] a b c
> Levels: a b c
>> y <- factor(x,lev=letters[3:1]) ## reorder the levels
>> y
> [1] a b c
> Levels: c b a
Bert,
Makes sense. I wonder if this will work when only a portion of the site
IDs need to be explicitly ordered. There are 64 sites in all. Might be
easier to sort the text file.
Thanks again,
Rich