I want to remove certain vectors from a list. I have for example this:
a<-c(1,2,5) b<-c(1,1,1) c<-c(1,2,3,4) d<-c(1,2,3,4,5) exampleList<-list(a,b,c,d) exampleList returns of course: [[1]] [1] 1 2 5 [[2]] [1] 1 1 1 [[3]] [1] 1 2 3 4 [[4]] [1] 1 2 3 4 5 Is there a way to remove certain vectors from a list in R. I want to remove all vectors in the list exampleList which contain both 1 and 5(so not only vectors which contain 1 or 5, but both). Thanks in advance!