redcap_data: Export REDCap dataset and label using metadata

View source: R/redcap_data.R

redcap_dataR Documentation

Export REDCap dataset and label using metadata

Description

Export the REDCap dataset, and use the metadata to classify the variables and label the columns.

Usage

redcap_data(
  redcap_project_uri,
  redcap_project_token,
  checkbox_value = "label",
  include_original = F,
  include_complete = F,
  repeat_format = "long",
  include_surveyfield = F
)

Arguments

redcap_project_uri

URI (Uniform Resource Identifier) for the REDCap instance.

redcap_project_token

API (Application Programming Interface) for the REDCap project.

checkbox_value

Determine if output checkbox variables should be unchanged from the REDCap record export ("raw") or labelled ("label"). Default = "raw".

include_original

Logical value to determine whether original data should be provided too (default = FALSE).

include_complete

Logical value to determine whether columns specifiying if forms are complete should be retained.

repeat_format

The format the repeating instrument data should be provided in. Options include "long" (default), "wide" (each instance a separate column), or "list" (nested instances).

Value

Three nested tibbles: (1) "exported": REDcap record export (unchanged) (2) labelled": REDcap record export with variables classified and columns labelled as specified via column_name and column_attr (3) "metadata": Cleaned metadata file for the REDCap dataset.


kamclean/collaborator documentation built on Nov. 17, 2023, 3:52 a.m.