你可以这样做:> x<-c(2, 4, 6, 9, 10) # the list> y<-c(4, 9, 10) # values to be removed> idx = which(x %in% y ) # Positions of the values of y in x> idx[1] 2 4 5> x = x[-idx] # Remove those values using their position and "-" operator> x[1] 2 6不久> x = x[ - which(x %in% y)]