util_get_code_list: Fetch a missing code list from the metadata

View source: R/util_get_code_list.R

util_get_code_listR Documentation

Fetch a missing code list from the metadata

Description

get missing codes from metadata (e.g. MISSING_LIST or JUMP_LIST)

Usage

util_get_code_list(
  x,
  code_name,
  split_char = SPLIT_CHAR,
  mdf,
  label_col = VAR_NAMES,
  warning_if_no_list = TRUE,
  warning_if_unsuitable_list = TRUE
)

Arguments

x

variable the name of the variable to retrieve code lists for. only one variable at a time is supported, not vectorized!!

code_name

variable attribute JUMP_LIST or MISSING_LIST: Which codes to retrieve.

split_char

character len = 1. Character(s) used to separate different codes in the metadata, usually |, as in 99999|99998|99997.

mdf

data.frame the data frame that contains metadata attributes of study data

label_col

variable attribute the name of the column in the metadata with labels of variables

warning_if_no_list

logical len = 1. If TRUE, a warning is displayed, if no missing codes are available for a variable.

warning_if_unsuitable_list

logical len = 1. If TRUE, a warning is displayed, if missing codes do not match with a variable' data type.

Value

numeric vector of missing codes.

See Also

Other missing_functions: util_all_intro_vars_for_rv(), util_count_expected_observations(), util_filter_missing_list_table_for_rv(), util_is_na_0_empty_or_false(), util_observation_expected(), util_remove_empty_rows(), util_replace_codes_by_NA()


dataquieR documentation built on May 29, 2024, 7:18 a.m.