check_data_arg_exists: Check requested data argument exists in REDCap data

check_data_arg_existsR Documentation

Check requested data argument exists in REDCap data

Description

Provide an error message when an argument is requested, but is not found in any read_redcap() redcap_data output.

Usage

check_data_arg_exists(db_data, col, arg, call = caller_env())

Arguments

db_data

The REDCap database output generated by REDCapR::redcap_read_oneshot()$data

col

The column to check for in redcap_data

arg

The argument used for the column check

call

The calling environment to use in the error message

Details

Currently used for the following arguments:

  • export_survey_fields: ⁠*_timestamp⁠

  • export_data_access_groups: redcap_data_access_group

Value

An error message saying the requested data does not exist


REDCapTidieR documentation built on April 3, 2025, 10:50 p.m.