RedcapProject: Wrapper for creating REDCap objects

redcap_projectR Documentation

Wrapper for creating REDCap objects

Description

Cleaner way for instantiating REDCap objects.

Avoids messing up instantiation in R6 classes which is more complex and error prone.

Usage

redcap_project(..., configs_location, custom_code_location = NA,
  updates_location = NA, exclusion_pattern = NA_character_)

Arguments

...

Individual configuration settings as expected in the configs file.

If configs_location is specified, these are discarded.

See details...

configs_location

Location of the configs file (csv). See details...

custom_code_location

Location of any custom code for error reporting (.R | .txt). See details...

updates_location

Location of a file containing any updates to redcap metadata. (csv) See details...

exclusion_pattern

A character vector of regex patterns for variables to exclude from autogeneration of error reporting code.

Details

This function acts as a wrapper for instantiating an object that abstracts the REDCap API.

It performs the necessary checks for instantiation hence avoids messy objects.

It then calls the new method of the underlying reference class.

The configs and update files must be csv files. See load_configs, load_updates for details.

The custom code must hold valid R code.

The exclusion patterns must hold valid R regex expressions. Can be full variable names or a set of patterns.

Value

A redcap class instance that can be used to interact with the data repository

See Also

Redcap


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