export_content: Export Content

Description Usage Arguments Details Value Examples

View source: R/export_redcap_project.R

Description

Export specific data elements from REDCap

Usage

1
export_content(content, uri = NULL, token = NULL, format = NULL, ...)

Arguments

content

The element to export, see Details.

uri

The URI for the REDCap API. If NULL (default) the value Sys.getenv("REDCap_API_URI") is used.

token

The API token for the project you want to export from. If NULL (default) the value Sys.getenv("REDCap_API_TOKEN") is used.

format

The format to return. If NULL (default) the value Sys.getenv("REDCap_API_format") is used.

...

additional arguments passed to handle_setform.

Details

The content and format arguments are used to control the specific items to be exported, and in what format. **Review the API documentation**

The uri, token, and format arguments are set to NULL by default and will look to the Sys.getenv("REDCap_API_URI"), Sys.getenv("REDCap_API_TOKEN"), and Sys.getenv("REDCap_API_format"), respectively, to define the values if not explicitly done so by the end user.

Value

The raw return from the REDCap API with the class rcer_raw_<content>.

Examples

1
2
3
4
5
6
7
# A reproducible example would require a REDCap project, accessable via an
# API token.  An example of the return from these calls are provided as data
# with this package.

# avs_raw_metadata <- export_content(content = "metadata")
data(avs_raw_metadata)
str(avs_raw_metadata)

REDCapExporter documentation built on Feb. 2, 2021, 5:15 p.m.