Colleagues, I am in the process of learning R. I've been able to import my dataset (from Stata) and do some simple coding. I have now come to coding situation that requires some assistance. This is some code in SPSS that I would like to be able to execute in R:
if (race eq 1 and usborn=0) confused=1 . if (race eq 2 and usborn=0) confused=1 . if (race eq 1 and usborn=1) confused=0 . if (race eq 2 and usborn=1) confused=0 . if (race eq 3 and usborn=1) confused=0 . if (race eq 3 and cohort=1) confused=0 . if (race eq 3 and cohort=2) confused=0 . variable labels confused "R claims to be both an African American and foriegn born" . value labels confused 1 "Both AfAm and Foreign" 2 "Not" . select if (confused eq 0) . Any assistance would be greatly appreciated. -- Mosi ______________________________________________ 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.