n_match | R Documentation |
This function counts how many times each element of vector x
matches any element in vector y
.
n_match(x, y)
x |
A vector of elements to be matched. |
y |
A vector in which the elements from |
An integer vector of the same length as x
, where each element indicates the number of times it matches in y
.
## Not run:
x <- c(1, 2, 3)
y <- c(1, 1, 2, 4)
n_match(x, y)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.