SyntaxFix
Write A Post
Hire A Developer
Questions
First we can define a new operator,
"%ni%" = Negate( "%in%" )
Then, its like x not in remove
x <- 1:10 remove <- c(2,3,5) x <- x[ x %ni% remove ]
or why to go for remove, go directly
x <- x[ x %ni% c(2,3,5)]