Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

parseBranchingLogic

Parse Branching Logic


Description

Branching logic from the REDCap Data Dictionary is parsed into R Code and returned as expressions. These can be evaluated if desired and allow the user to determine if missing values are truly missing or not required because the branching logic prevented the variable from being presented.

Usage

parseBranchingLogic(l)

Arguments

l

A vector of REDCap branching logic statements. These are usually passed as the vector meta_data$branching_logic.

Details

For a study, I was asked to identify which subjects had missing values so that remaining data could be collected. The initial pass of is.na produced a lot of subjects missing values where there was no need to collect data because they did not qualify for some variables in the branching logic. Parsing the logic allowed me to determine which values we expected to be missing and narrow the search to just those subjects with legitimately missing values.

Value

Returns a list of unevaluated expressions.

Author(s)

Benjamin Nutter


redcapAPI

Interface to 'REDCap'

v2.3
GPL-2
Authors
Benjamin Nutter [aut, ctb, cre], Stephen Lane [ctb], Will Beasley [ctb], Jeffrey Horner [ctb], Will Gray [ctb], Jeremy Stephens [ctb], Marcus Lehr [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.