View source: R/vector_in_vector.R
vector_in_vector | R Documentation |
This function searches for each element of vector1 (needle) in the corresponding element of vector2 (haystack), and returns a logical vector. Unlike the
vector_in_vector(needle, haystack, vector = TRUE)
needle |
the vector whose elements are searched for |
haystack |
the vector whose elements are searched |
vector |
Logical. Default set to TRUE. Returns a logical vector for matches in each element of haystack. If vector = FALSE, a single boolean is returned indicating if all elements have a match. |
needle <- c("i","ii","iii") haystack <- c("i","xniiv", "ximini") vector_in_vector(needle,haystack, vector = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.