LoadUpdates: Wrapper for creating REDCap update objects

load_updatesR Documentation

Wrapper for creating REDCap update objects

Description

Cleaner way for instantiating RedcapUpdate object(s).

It uses an R data frame to instantiate update objects.

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

Usage

load_updates(updates_data)

Arguments

updates_data

A dataset containing the updates info. For the column specifications, see Details.

Details

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

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

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

The update dataset must contain the following variables:

update

The update name of format mon-yy, eg Nov-14, Feb-13

site

The hospital id of the site, must be integer and must be replicated for each update

date

The date of the update for each specific site

new_vars

The new variables introduced during the update <must have at least one entry per update>.

The first non misssing entry will be used.

The variable names must be separated by semi-colons.

Value

A list of redcap update class objects.

See Also

RedcapUpdate Redcap, redcap_project

Other Configuration Objects: RedcapConfig, RedcapUpdate, config_keys, load_configs


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