util_find_var_by_meta: Try hard, to map a variable

View source: R/util_find_var_by_meta.R

util_find_var_by_metaR Documentation

Try hard, to map a variable

Description

does not warn on ambiguities nor if not found (but in the latter case, it returns ifnotfound)

Usage

util_find_var_by_meta(
  resp_vars,
  meta_data = "item_level",
  label_col = LABEL,
  allowed_sources = c(VAR_NAMES, label_col, LABEL, LONG_LABEL),
  target = VAR_NAMES,
  ifnotfound = NA_character_
)

Arguments

resp_vars

variables to map from

meta_data

metadata

label_col

label-col to map from, if not allowed_sources should be entirely passed

allowed_sources

allowed names to map from (as metadata columns)

target

metadata attribute to map to

ifnotfound

list A list of values to be used if the item is not found: it will be coerced to a list if necessary.

Value

vector of mapped target names of resp_vars


dataquieR documentation built on July 26, 2023, 6:10 p.m.