| match_multi | R Documentation |
Extension of the base 'match' function to the case where elements of x and y can contain multiple items to be matched. Only the first match for each x element is returned.
match_multi(x, y, sep_y = ";", sep_x = NULL)
x |
a character vector |
y |
a character vector |
sep_y |
character separating different items to be matched in a given y element |
sep_x |
character separating different items to be matched in a given x element |
a numeric vector with matching indices
x <- c("a;aa", "b")
y <- c( "bb", "c;b", "aa", "c;a;b")
match_multi(x=x, y=y, sep_y = ";")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.