matches_once: Check if an Element Matches Exactly Once

View source: R/n_match.R

matches_onceR Documentation

Check if an Element Matches Exactly Once

Description

This function checks whether a specific element from vector x appears exactly once in vector y.

Usage

matches_once(x, y)

Arguments

x

A vector containing the elements to match.

y

A vector in which the elements from x will be matched.

Value

A logical vector of the same length as x, where each element is TRUE if it matches exactly once in y, and FALSE otherwise.

Examples

## Not run: 
x <- c(1, 2, 3)
y <- c(1, 1, 2, 4)
matches_once(x, y)
## End(Not run)


hgnc documentation built on June 18, 2025, 9:09 a.m.