download_interview_report: Download a Report from the Integrated Data Tool REDcap...

View source: R/download_generic.R

download_interview_reportR Documentation

Download a Report from the Integrated Data Tool REDcap Project

Description

download_interview_report() downloads a report from the Integrated Data Tool project. You'll need API access to the project (and an API token for it) to use this function.

Usage

download_interview_report(
  date = Sys.Date(),
  api_token,
  report_id,
  headers = c("raw", "label"),
  directory,
  new_file,
  force = FALSE
)

Arguments

date

A Date indicating the date of the file to download

api_token

The API token for accessing the Data for Regions REDcap project. This should be stored in an .Renviron file; see env_vars for details.

report_id

The ID of the report to download

headers

Should column headers be raw variable names or labels?

directory

A string specifying the save directory; this should usually be left alone

new_file

A string specifying the save file name; this should always end in .csv and should usually be left alone

force

A logical indicating whether to ignore any existing files matching date and directory

Value

Invisibly returns the path to the new data file


jesse-smith/coviData documentation built on Jan. 14, 2023, 11:08 a.m.