ConvertRedcapLogicToR: Convert REDCap logic to R code.

convert_redcap2rR Documentation

Convert REDCap logic to R code.

Description

Wrapper for converting REDCap branching logic to valid R code (for metaprogramming purposes).

Usage

convert_redcap2r(x)

Arguments

x

A string containing REDCap logic.

Details

REDCap data dictionaries contain logic encapsulated in the branching logic that affects data capture and hence data management and analysis.

These logic(s) have to be transformed into the appropriate analytical tool's DSL for consistent data munging and analysis.

In our case, this involves conversion from REDCap logic to R code.

This is a composite function made up of an aggregation of many smaller internal functions.

Value

A string with containing valid R code (token) that can be parsed in it's current context into an R expression tree for evaluation.


smockin/RedcapData documentation built on Feb. 2, 2023, 3:19 a.m.