allMatch | R Documentation |
Return all matching element indexes in subject vector from query vector.
allMatch(query, subject)
query |
a vector to look up in subject vector |
subject |
vector for indexing of matched query |
list object
Daniel Leongamornlert
# Input query and subject vecots
match.list <- allMatch(query = c(1, 2, 3), subject = c(1, 1, 2, 2, 3, 3, 2))
# Output is query length list with subject indexes
match.list
# $`1`
# [1] 1 2
#
# $`2`
# [1] 3 4 7
#
# $`3`
# [1] 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.