[R] Remove vector elements from another vector

Karsten Luder kalleswedens at hotmail.com
Tue Sep 13 14:35:17 CEST 2005


I have two vectors of different lengths. Fx a <- 1:9; b <- c(4, 5).
What is the best way to remove the elements in vector b from vector a so 
that the result would be a vector with elements c(1,2,3,6,7,8,9)?

Best regards,

Find masser af gode tilbud på MSN Shopping http://shopping.msn.dk/

More information about the R-help mailing list