allMatch: Match all elements in vector.

View source: R/allMatch.R

allMatchR Documentation

Match all elements in vector.

Description

Return all matching element indexes in subject vector from query vector.

Usage

allMatch(query, subject)

Arguments

query

a vector to look up in subject vector

subject

vector for indexing of matched query

Value

list object

Author(s)

Daniel Leongamornlert

Examples

# 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

oncogenetics/oncofunco documentation built on March 9, 2024, 5:23 p.m.