camr_redcap_read: Read All Records From a REDCap Project

View source: R/R03-REDCap.R

camr_redcap_readR Documentation

Read All Records From a REDCap Project

Description

This function seeks to mimic the redcap_read() function for the (now defunct) REDCapR package,but with a more robust output that can handle bizarre characters and calculated fields. This function handles all REST API calls using httr. This function also uses calls to furrr and future for downloading batches from REDCap. The plan is not specified. Instead, the user should use the plan that works best for their specific use.

Usage

camr_redcap_read(redcap_uri, token, raw_or_label = "label", batch_size = 100)

Arguments

redcap_uri

The URI (uniform resource identifier) of the REDCap project. Required.

token

The user-specific string that serves to authenticate the call to the REST API. Required.

raw_or_label

A string (either 'raw' or 'label') which specifies whether the exported data should be the raw coded/numerical values or the human-readable labels. Default is label.

batch_size

An integer indicating the number of records to download at once.

Value

A list which contains the following elements:

  • data: A data frame containing all records and all fields.

  • success:A logical indicating the success of the download.

  • metaData: A data frame containing the REDCap metadata for all fields.

Author(s)

William Schmitt


rettopnivek/camrprojects documentation built on March 26, 2024, 9:17 a.m.