Why does the subset not work in the which() version below? Thank you
v1 <- subset(t1, version_1==as.character("100-1") | version_1==as.character("100-2")) a<-c("100-1", "100-2") v1 <- subset(t1, which(a==as.character(version_1)) != 0) [[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.