%qsin% | R Documentation |
This function performs a quick, case insensitive search of strings
string %qsin% vector
string |
character vector that contains the values to match |
vector |
character vector that has the values to be matched against |
'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
Dylan Russell (stackoverflow code, examples, and function details, function description), Irucka Embry
data.table - R case-insensitive %in% - Stack Overflow answered and edited by Dylan Russell on Sep 13, 2020. See https://stackoverflow.com/questions/63874824/r-case-insensitive-in.
# Examples
x <- c("apple", "banana", "cherry", NA)
"apple" %qsin% x
c("APPLE", "BANANA", "coconut", NA) %qsin% x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.