[R] select from data frame

Andras Farkas motyocska at yahoo.com
Sat Jul 15 13:01:06 CEST 2017


Dear All,

wonder if you could please assist with the following 

df<-data.frame(ID=c(1,1,1,2,2,3,3,4,4,5,5),samples=c("A","B","C","A","C","A","D","C","B","A","C"))

from this data frame the goal is to extract the value of 3 from the ID column based on the logic that the ID=3 in the data frame has NO row that would pair 3 with either "B", AND/OR "C" in the samples column...


much appreciate your help...

thanks,
 Andras



More information about the R-help mailing list