Dear R help I was hoping you might be able to show me how to write a loop function take would ccomplish this task.
library(prob) { a <- sample ( 1:20, 100, replace=T) b<-sample(5:24,100,replace=T) } dd <- data.frame(a,b) dd # code piece I am looking for if(subset(dd,c(1,23,ordered=F))is found))( print subset) else( continue evaluating subsets) subset(dd,isin(dd,c(1,23), ordered = FALSE)) subset(dd,isin(dd,c(3,23),ordered=F)) subset(dd,isin(dd,c(4,11),ordered=F)) subset(dd,isin(dd,c(7,15),ordered=F)) Thank you G [[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.