[R] Recoding factors

2004-10-18 Thread Neil Leonard
I'm having a bit of trouble recoding factors in a fields. I have a field which has the factors Singleton, Twin and Triplet. I want to recode the field to have only the factors Singleton and Multiple. Any advice? Cheers, Neil __ [EMAIL PROTECTED]

Re: [R] Recoding factors

2004-10-18 Thread Uwe Ligges
Neil Leonard wrote: I'm having a bit of trouble recoding factors in a fields. I have a field which has the factors Singleton, Twin and Triplet. I want to recode the field to have only the factors Singleton and Multiple. Any advice? Depends on what you are going to do with the Twin ... Uwe Ligges

Re: [R] Recoding factors

2004-10-18 Thread Neil Leonard
I want Twin and Triplet to both be recoded as Multiple Neil On 18/10/2004, at 7:43 PM, Uwe Ligges wrote: Neil Leonard wrote: I'm having a bit of trouble recoding factors in a fields. I have a field which has the factors Singleton, Twin and Triplet. I want to recode the field to have only the

Re: [R] Recoding factors

2004-10-18 Thread Prof Brian Ripley
On Mon, 18 Oct 2004, Uwe Ligges wrote: Neil Leonard wrote: I'm having a bit of trouble recoding factors in a fields. I have a field which has the factors Singleton, Twin and Triplet. I want to recode the field to have only the factors Singleton and Multiple. Any advice?

Re: [R] Recoding factors

2004-10-18 Thread Neil Leonard
Yes that's it. Thanks Neil On 18/10/2004, at 7:57 PM, Prof Brian Ripley wrote: On Mon, 18 Oct 2004, Uwe Ligges wrote: Neil Leonard wrote: I'm having a bit of trouble recoding factors in a fields. I have a field which has the factors Singleton, Twin and Triplet. I want to recode the field to have

Re: [R] Recoding factors

2004-10-18 Thread Chuck Cleland
See ?levels. I think you want something like the following: levels(myfact) - c(Singleton, Multiple, Multiple) Neil Leonard wrote: I'm having a bit of trouble recoding factors in a fields. I have a field which has the factors Singleton, Twin and Triplet. I want to recode the field to have only