util_all_intro_vars_for_rv: Get all 'PART_VARS' for a response variable (from item-level...

View source: R/util_all_intro_vars_for_rv.R

util_all_intro_vars_for_rvR Documentation

Get all PART_VARS for a response variable (from item-level metadata)

Description

Get all PART_VARS for a response variable (from item-level metadata)

Usage

util_all_intro_vars_for_rv(
  rv,
  study_data,
  meta_data,
  label_col = LABEL,
  expected_observations = c("HIERARCHY", "ALL", "SEGMENT")
)

Arguments

rv

character the response variable's name

study_data

study_data

meta_data

meta_data

label_col

character the metadata attribute to map meta_data on study_data based on colnames(study_data)

expected_observations

enum HIERARCHY | ALL | SEGMENT. How should PART_VARS be handled: - ALL: Ignore, all observations are expected - SEGMENT: if PART_VAR is 1, an observation is expected - HIERARCHY: the default, if the PART_VAR is 1 for this variable and also for all PART_VARS of PART_VARS up in the hierarchy, an observation is expected.

Value

character all PART_VARS for rv from item level metadata. For expected_observations = HIERARCHY, the more general PART_VARS (i.e., up, in the hierarchy) are more left in the vector, e.g.: ⁠PART_STUDY, PART_PHYSICAL_EXAMINATIONS, PART_BLOODPRESSURE⁠


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