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 holtman wrote:
> I think you want to use 'ifelse':
>
> social$Citize
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 Anderson wrote:
> I have a variable that identifies citizen type but some of my rows are blank.
> I want to replace the bla
2 matches
Mail list logo