util_eval_rule: Evaluate a parsed redcap rule for given study data

View source: R/util_eval_rule.R

util_eval_ruleR Documentation

Evaluate a parsed redcap rule for given study data

Description

also allows to use VAR_NAMES in the rules, if other labels have been selected

Usage

util_eval_rule(
  rule,
  ds1,
  meta_data = "item_level",
  use_value_labels,
  replace_missing_by = "NA",
  replace_limits = TRUE
)

Arguments

rule

the redcap rule (parsed, already)

ds1

the study data as prepared by prep_prepare_dataframes

meta_data

the metadata

use_value_labels

map columns with VALUE_LABELS as factor variables

replace_missing_by

enum LABEL | INTERPRET | NA . Missing codes should be replaced by the missing labels, the AAPOR codes from the missing table or by NA. Can also be an empty string to keep the codes.

replace_limits

logical replace hard limit violations by NA

Value

the result of the parsed rule


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