read_redcap_project: Read in data from Redcap project via Redcap API

Description Usage Arguments Value Examples

View source: R/read_redcap_project.R

Description

Read in data from Redcap project via Redcap API

Usage

1
2
3
4
5
6
7
8
read_redcap_project(
  uri,
  token_name,
  fields = NULL,
  forms = NULL,
  raw_or_label = "raw",
  raw_or_label_headers = "raw"
)

Arguments

uri

Name of the environment variable that stores the link to a Redcap server.

token_name

Name of the environment variable that stores the API key which grants access to a REDCAP project.

fields

A string or a vector of strings. Indicates desired fields to query from REDCAP project.

forms

A string or a vector of strings. Indicates desired forms to query from REDCAP project.

raw_or_label

A string representing whether to include raw or labelled variable values. Two options: "raw" or "label"

raw_or_label_headers

A string representing whether to include raw or labelled variable names. Two options: "raw" or "label".

Value

A data frame containing Redcap project data

Examples

1
2
read_redcap_project(uri = "path/to/Redcap/API/Server", token_name = "NAME_OF_token_name_IN_RENVIRON", raw_or_label = "label", raw_or_label_token_names = "label")
mapply(read_redcap_metadata, token = get_environment_vars("^REDCAP"), uri = "path/to/Redcap/API/Server")

antchau/glider documentation built on Dec. 1, 2020, 9:23 p.m.