f_search_values_in_list_of_data_frames: Search values in list of data frames

View source: R/f - Search values in list of data frames.R

f_search_values_in_list_of_data_framesR Documentation

Search values in list of data frames

Description

Search values in list of data frames.

Usage

f_search_values_in_list_of_data_frames(
  l.input,
  v.key,
  l.value,
  v.strategy = NULL
)

Arguments

l.input

List of data frames, in which we want to determine which data frame(s) contain the requested values.

v.key

Vector of volumn name(s) in the data frames in which we search for requested values.

l.value

List of vectors with value(s) to search for in said column(s).

v.strategy

Vector of "all" and/or "any", corresponding to each column name that is searched in. This allows to match all values or to match any of the values in the respective vector in l.value. In case of the default (NULL) all values in the respective vector in l.value must match.

Details

Note, v.key, l.value, and v.strategy (if given) must have equal length.

Value

Vector of list indices that contain requested values.

Author(s)

Pieter Overdevest

Examples

v.output <- f_search_values_in_list_of_data_frames(

    l.input    = l.bord.allocation,
    v.key      = c("bord.type", "jaar.laatste.vastlegging"),
    l.value    = list(c("A01120", "A01100"), "2021"),
    v.strategy = NULL
)

pieterov/generaltoolbox documentation built on Jan. 25, 2025, 10:32 a.m.