[R] group factor levels

baptiste auguie baptiste.auguie at googlemail.com
Wed Feb 3 15:19:38 CET 2010


As always the question seems silly after you've learned the answer!

Thanks a lot,

baptiste

On 3 February 2010 15:06, Petr PIKAL <petr.pikal at precheza.cz> wrote:

> # order levels
> f.t<-factor(f, levels=disorder)
> # change levels
> levels(f.t) <- new.lev
> all.equal(f.t,f2)
> [1] TRUE
>
>
> Regards
> Petr
>
>
>>
>> Best regards,
>>
>> baptiste
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
>



More information about the R-help mailing list