[R] Retrieving Factors with Levels Ordered
H. T. Reynolds
htr at udel.edu
Sat Jan 1 19:59:45 CET 2011
Thanks to one and all. I now have a better understanding of the situation.
---- Original message ----
>Date: Sat, 1 Jan 2011 11:03:59 -0500
>From: David Winsemius <dwinsemius at comcast.net>
>Subject: Re: [R] Retrieving Factors with Levels Ordered
>To: htr at UDel.Edu
>Cc: r-help at r-project.org
>On Jan 1, 2011, at 12:41 AM, H. T. Reynolds wrote:
>> Hello (and Happy New Year),
>> When I create a factor with labels in the order I want, write the
>> data as a text file,
>Why? What is the reason for this process.
>> and then retrieve them, the factor levels are no longer in the
>> proper order.
>Two further ideas to those offered by Turlach and Bolker:
>You can name them with leading digits that ascend in the desired order
>I have seen described ( but not found a fully worked example despite
>what I thought was an adequate search) the use of an as() method
>which in this instance might apply as.factor with your own level
>specification while reading with colClasses.
More information about the R-help