list_in_vector: Find a vector of strings/numbers in a single string.

View source: R/list_in_vector.R

list_in_vectorR Documentation

Find a vector of strings/numbers in a single string.

Description

list_in_vector returns the sum of all the values present in its arguments.

Usage

list_in_vector(list, vector, all = FALSE)

Arguments

list

list of either numeric or character vectors that you would like to find.

vector

a numeric or character vector to be searched

all

default is FALSE. If FALSE, returns a logical vector. If TRUE, returns a boolean indicating whether or not all elements contained matches.

Details

Test whether each element of list[[index]] can be found in the corresponding vector[index] for the whole list. If yes, returns TRUE else returns FALSE

Value

boolean. True or False

Examples

list <- list(c('hi','bi','sc'),c('h','o','g'),c('fu','lc','rum'))
vector <-c('hibiscus','goh','fulrum')
list_in_vector(list,vector)
list_in_vector(list,vector,all=FALSE)

rumroses12/invector documentation built on Feb. 8, 2023, 3:50 a.m.