ExtendCheckboxNames: Reshape REDCap checkbox logic in REDCap to the appropriate R...

xtend_chb_namesR Documentation

Reshape REDCap checkbox logic in REDCap to the appropriate R code

Description

Expand REDCap branching logic and other code that include checkboxes to match indexing format used in underlying repository.

Usage

xtend_chb_names(x)

Arguments

x

String with REDCap logic possibly with embedded checkbox references.

Details

For code generation, code has to be translated from one DSL or syntax to another.

In this case, conversion from REDCap logic to the appropriate R syntax.

This function helps expand REDCap checkbox syntax eg chk(1) to the underlying data format expected in R eg chk___1

Value

Preprocessed R code that can be refined further or valid R syntax that can be parsed into an expression tree for evaluation.

See Also

Other RedcapToR: convert_dates_red2r, convert_missing_red2r, format_branching_logics, is_hidden, logical_xpressions_red2r


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