Learn R Programming

hgnc (version 0.3.0)

matches_once: 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)

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.

Arguments

x

A vector containing the elements to match.

y

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

Examples

Run this code
if (FALSE) {
x <- c(1, 2, 3)
y <- c(1, 1, 2, 4)
matches_once(x, y)}

Run the code above in your browser using DataLab