download_study: Download a Clinical Trial Study Dataset

View source: R/download.R

download_studyR Documentation

Download a Clinical Trial Study Dataset

Description

Downloads a study dataset from a GitHub Release and stores it in the local cache (see cache_dir()). Once downloaded, the study is available to connect_clinical_data() without an internet connection.

Requires the piggyback package.

Usage

download_study(
  source,
  version = "latest",
  force = FALSE,
  repo = "Lovemore-Gakava/clinTrialData"
)

Arguments

source

Character string. The name of the study to download (e.g. "cdisc_pilot"). Use list_available_studies() to see all options.

version

Character string. The release tag to download from. Defaults to "latest", which resolves to the most recent release.

force

Logical. If TRUE, re-download even if the study is already cached. Defaults to FALSE.

repo

GitHub repository in the form "owner/repo". Defaults to the official clinTrialData release repository.

Value

Invisibly returns the path to the cached study directory.

Examples


# Download the CDISC Pilot study
download_study("cdisc_pilot")

# Then connect as usual
db <- connect_clinical_data("cdisc_pilot")


clinTrialData documentation built on March 3, 2026, 5:07 p.m.