I would like to code records in a dataset with a 1 if any of the columns 9-67 contain a particular code, and zero if they don't. I've been working with "subset" and it seems that something like subset(data, data[9:67]--"12345") would work, but I have been unsuccessful so far. It seems like a simple problem - any help is appreciated!
______________________________________________ R-help@stat.math.ethz.ch 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.