This post has NOT been accepted by the mailing list yet. I would like to subset a column based on the contents of a column with specific character. In the sample data I wish to do the following:
First keep the data based on column "prog" if prog contains "ca", and secondly to drop if race contains "ic" Thanks library(foreign) hsb2 <- read.dta('http://www.ats.ucla.edu/stat/stata/notes/hsb2.dta') ______________________________________________ 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.