Thank you. When I received the reply it dawned on me why my attempts had
been unsuccessful. HR, HRRES and SUBURB are all factors. It's time to go
home I was at this solution an hour ago and somehow missed it. I've now
got it working.
 
 

-----Original Message-----
From: Petr Pikal [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 17 July 2003 4:27 PM
To: Mulholland, Tom
Cc: [EMAIL PROTECTED]
Subject: Re: [R] Recode from 2 variables


Hi

On 17 Jul 2003 at 16:17, Mulholland, Tom wrote:

> I am trying to create a new variable which uses the suburb names if HR
> and HRRES are the same but which uses HRRES if they are different. Any
> assistance would be appreciated as my brain has just packed up. I'm
> not sure I can teach myself anymore new tricks this afternoon. 

Something like

ifelse(HR==HRRES,suburb,HRRES)

should help


        [[alternative HTML version deleted]]

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to