find_unique: Return index of from which is uniquely matched to the...

View source: R/algorithm.R

find_uniqueR Documentation

Return index of from which is uniquely matched to the argument

Description

Find unique index number in from at which is equal to what.

Usage

find_unique(what, from, condition = `==`)

Arguments

what

value of sequence for finding

from

index of this argument is returned

condition

condition for finding. Default is "=="

Value

List of index which is found in from. NA if it is not found, or multiple index are found.

Examples

find_unique(c(1,3,5), c(0,1,2,3,3))
# c(2,NA,NA)

hmito/hmRLib documentation built on March 13, 2024, 9:41 p.m.