Hello!
I would like to know if there is a simple way to reorder levels of a given
factor.Let's say that the vector
testf-factor(c(red,red,red,blue,blue,white))
levels(testf) : blue red white
should have reordered levels such as
levels(testf) : red blue white
(this is for
testf - ordered(testf, levels=c(red, blue, white))
?ordered
Anne wrote:
Hello!
I would like to know if there is a simple way to reorder levels of a given factor.Let's say that the vector
testf-factor(c(red,red,red,blue,blue,white))
levels(testf) : blue red white
should have reordered
: [R] ordering levels
Hello!
I would like to know if there is a simple way to reorder
levels of a given factor.Let's say that the vector
testf-factor(c(red,red,red,blue,blue,white))
levels(testf) : blue red white
should have reordered levels such as
levels(testf) : red blue
On Wed, 22 Dec 2004 13:06:02 +0100 Anne wrote:
Hello!
I would like to know if there is a simple way to reorder levels of a
given factor.Let's say that the vector
testf-factor(c(red,red,red,blue,blue,white))
levels(testf) : blue red white
should have reordered levels such as
--
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Anne
Sent: Wednesday, December 22, 2004 1:06 PM
To: R list
Subject: [R] ordering levels
Hello!
I would like to know if there is a simple way to reorder
levels of a given
On 22-Dec-04 Anne wrote:
Hello!
I would like to know if there is a simple way to reorder levels
of a given factor.Let's say that the vector
testf-factor(c(red,red,red,blue,blue,white))
levels(testf) : blue red white
should have reordered levels such as
levels(testf) : red blue