grapes-ni-grapes: "Not in" function

Description Usage Arguments Examples

Description

Base R has the %in% function to create a logical vector whether one object is contained within another object. Why not %ni% to get a logical vector if one object is NOT contained within another? Idea from stackoverflow http://stackoverflow.com/questions/11302985/match-with-negation

Usage

1
... %ni% NA

Arguments

myobject

a vector

Examples

1
2
5 %ni% c(2,4,6)
# TRUE

smach/rmiscutils documentation built on Dec. 15, 2021, 1:49 a.m.