n_match {hgnc} | R Documentation |
Count the Number of Matches for Each Element in a Vector
Description
This function counts how many times each element of vector x
matches any element in vector y
.
Usage
n_match(x, y)
Arguments
x |
A vector of elements to be matched. |
y |
A vector in which the elements from |
Value
An integer vector of the same length as x
, where each element indicates the number of times it matches in y
.
Examples
## Not run:
x <- c(1, 2, 3)
y <- c(1, 1, 2, 4)
n_match(x, y)
## End(Not run)
[Package hgnc version 0.3.0 Index]