what is analogous command to %in%
but which means that something is not in certain set ? Something like 'k' %not_in% c('a','b')
?
Asked
Active
Viewed 46 times
1 Answers
2
See if this answers:
> '%not_in%' <- function(a,b){
+ !(a%in%b)
+ }
> 'k' %not_in% c('a','b')
[1] TRUE
> 'k' %not_in% c('a','b','k')
[1] FALSE
> c('a','c') %not_in% c('b','z','k','a','f','c')
[1] FALSE FALSE

Karthik S
- 11,348
- 2
- 11
- 25