Description Usage Arguments Value Examples
Find first matching candidate
1 | find_first_match(candidates, x, ...)
|
candidates |
Character vector of candidates to be matched against ‘x’ |
x |
Character vector |
... |
Further arguments passed on to |
#' Index of the element of ‘candidates’ that matches the element of ‘x’ with the smallest index. In case of ties, the smallest of the tied indexes is returned. If none of the candidates match any of the elements in ‘x’, NA is returned.
1 | find_first_match(c("foo", "bar", "baz", "quux"), c("baz", "quux", "bar"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.