[R] Help on indicator variables

Jorge I Velez
Thu, 21 Mar 2013 13:08:38 -0000

Try

ifelse(ABS ==1 | DEFF == 1, 1, 0)

HTH,
Jorge.-



On Fri, Mar 22, 2013 at 12:02 AM, Tasnuva Tabassum
<t.tasnuva@gmail.com>wrote:

> I have two indicator variables ABS and DEFF. I want to create another
> indicator variable which will take value 1 if either ABS=1 or DEFF=1.
> Otherwise, it will take value 0. How can I make that?
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html