Learn R Programming

dataquieR (version 2.1.0)

util_eval_rule: 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
)

Value

the result of the parsed rule

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

See Also

Other redcap: util_get_redcap_rule_env()