Re: [R] Merging value labels into indicator variable.

2013-02-27 Thread PIKAL Petr
; Berend Hasselman Subject: Re: [R] Merging value labels into indicator variable. Yes, I tried them all. They worked well. I think when I have a little complex case where NAM has values 1,2,3,22,88,101 and I need to make an indicator taking value 1 for NAM=22 or NAM=88 or NAM=101; I may use Var001

Re: [R] Merging value labels into indicator variable.

2013-02-26 Thread PIKAL Petr
t; Cc: R help > Subject: Re: [R] Merging value labels into indicator variable. > > Thanx all, I found my answer. I prefer Peter's second solution. > > > On Tue, Feb 26, 2013 at 11:59 PM, Berend Hasselman > wrote: > > > > > On 26-02-2013, at 18:45, Tasn

Re: [R] Merging value labels into indicator variable.

2013-02-26 Thread Tasnuva Tabassum
Thanx all, I found my answer. I prefer Peter's second solution. On Tue, Feb 26, 2013 at 11:59 PM, Berend Hasselman wrote: > > On 26-02-2013, at 18:45, Tasnuva Tabassum wrote: > > > I have a vaiable named NAM having value : 1,2,3,4,5,6,7,8,9. I want to > > make an indicator variable that will

Re: [R] Merging value labels into indicator variable.

2013-02-26 Thread Berend Hasselman
On 26-02-2013, at 18:45, Tasnuva Tabassum wrote: > I have a vaiable named NAM having value : 1,2,3,4,5,6,7,8,9. I want to > make an indicator variable that will take value 1 if NAM=7 or NAM=8 or > NAM=9. How can I do that? > I usually do: Var001<- ifelse(NAM==7,1,0) for the simplest case. How

Re: [R] Merging value labels into indicator variable.

2013-02-26 Thread Pete Brecknock
tasnuvat wrote > I have a vaiable named NAM having value : 1,2,3,4,5,6,7,8,9. I want to > make an indicator variable that will take value 1 if NAM=7 or NAM=8 or > NAM=9. How can I do that? > I usually do: Var001<- ifelse(NAM==7,1,0) for the simplest case. > > [[alternative HTML version dele