indicesInList: indicesInList

View source: R/listOps.R

indicesInListR Documentation

indicesInList

Description

Find the occurrences of items in a list of vectors

Usage

indicesInList(x, l)

Arguments

x

vector of items to be found in the list

l

list of vectors in which x should be found

Value

a list containing an element for each item in x that contains the indices of its occurrence in l

Examples

l <- list(1:3, 4:5, 5:9)
x <- c(2,3,5,666,8,5)
indicesInList(x, l)

demuellae/muRtools documentation built on Sept. 8, 2023, 4:32 p.m.