Re: [R] conditional recoding a variable

2009-07-02 Thread jim holtman
I think you want to use 'ifelse': social$CitizenType-ifelse(social$CitizenType== ||social$PrimaryLanguage==English,US Citizen ) On Wed, Jul 1, 2009 at 5:45 PM, Chris Andersonchris6...@netzero.net wrote: I have a variable that identifies citizen type but some of my rows are blank. I want to

Re: [R] conditional recoding a variable

2009-07-02 Thread jim holtman
Should be (I think): (default condition and the use of | instead of ||) social$CitizenType-if(social$CitizenType== | social$PrimaryLanguage==English,US Citizen, social$CitizenType ) On Thu, Jul 2, 2009 at 7:19 AM, jim holtmanjholt...@gmail.com wrote: I think you want to use 'ifelse':