From h.wickham at gmail.com  Thu Feb  4 19:04:17 2010
From: h.wickham at gmail.com (hadley wickham)
Date: Thu, 4 Feb 2010 12:04:17 -0600
Subject: [Rd] Why is there no c.factor?
In-Reply-To: <4B6AF9A1.4080605@pburns.seanet.com>
References: <f8e6ff051002040753x33282f33l78fce9f98dc29ae8@mail.gmail.com> 
	<4B6AF9A1.4080605@pburns.seanet.com>
Message-ID: <f8e6ff051002041004r421a2b85t67514a29b898f814@mail.gmail.com>

On Thu, Feb 4, 2010 at 10:45 AM, Patrick Burns <pburns at pburns.seanet.com> wrote:
> The argument I have in 'The R Inferno'
> is that how you want to combine factors
> may differ from someone else's desires.
>
> There are lots of tricky questions:
> What about ordered factors?
> What if the ordered levels are different in
> different objects?

Ordered factors are trickier.  I'd suggest the following compromise:

 * if all orders are the same, return an ordered factor
 * if not, return a factor with a warning

Hadley

-- 
http://had.co.nz/



[Rd] Why is there no c.factor?
hadley wickham