%notchin% | R Documentation |
This function performs a quick, case sensitive search of character vectors
that are not in a set of character vectors or a quick, search of numeric
vectors that are not in a set of numeric vectors using Negate
chin
for character vectors and Negate
in
for numeric vectors
x %notchin% y
x |
character or numeric vector that contains the values to not be matched |
y |
character or numeric vector that has the values to be checked within |
'Utilizes chin from data.table to quickly complete a case insensitive search through a character vector to return a logical vector of string detections. Will always return TRUE or FALSE for each position of string regardless of NA missing values in either provided vector. NA in string will never match an NA value in the vector.'
logical vector the length of the original string (x). TRUE means that x is not in y and FALSE means that x is in y
kaijagahm (R code), Irucka Embry
The
# Examples
x <- c("apple", "banana", "cherry", NA)
"apple" %notchin% x
c("apple", "BANANA", "coconut", NA) %notchin% x
x
"a" %notchin% letters[5:20]
letters[5:20] %notchin% "a"
"a" %notchin% LETTERS
LETTERS %notchin% "a"
1 %notchin% -12:20
-12:20 %notchin% 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.