[R] Factor levels.

Rolf Turner r.turner at auckland.ac.nz
Wed Oct 3 22:38:00 CEST 2007


On 4/10/2007, at 8:29 AM, Peter Dalgaard wrote:

> Rolf Turner wrote:
>>     P.S.  ***Are*** there any risks/dangers in following Christos  
>> Hatzis' suggestion of simply doing
>>
>>             levels(fff) <- c("U","A","S")       ???
> Not if the levels are right to begin with.
>
> Problems only arise if fff somehow becomes a two-level factor, e.g.  
> if you do
>   fff <- fff[2:3, drop=TRUE].

	Ah-ha.  The light dawns.   And one should ***never*** assume that the
	levels are right to begin with ---- Murphy's law being what it is!

	Thanks.

			cheers,

				Rolf

######################################################################
Attention:\ This e-mail message is privileged and confidenti...{{dropped}}



More information about the R-help mailing list