On Tuesday 19 October 2010, Phil Spector wrote:
> I always find R useful to solve problems like this:
> 
>    dummy = as.numeric(cleary$D1 %in% c(4,6,7))

Indeed, and this works too:
dummy <- 1*(cleary$D1 %in% c(4,6,7))

Adrian 

-- 
Adrian Dusa
Romanian Social Data Archive
1, Schitu Magureanu Bd.
050025 Bucharest sector 5
Romania
Tel.:+40 21 3126618 \
     +40 21 3120210 / int.101
Fax: +40 21 3158391

______________________________________________
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.

Reply via email to