Try ifelse(ABS ==1 | DEFF == 1, 1, 0)
HTH, Jorge.- On Fri, Mar 22, 2013 at 12:02 AM, Tasnuva Tabassum <t.tasn...@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 > and provide commented, minimal, self-contained, reproducible code. > [[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 and provide commented, minimal, self-contained, reproducible code.