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"). Uselist_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 toFALSE.- repo
GitHub repository in the form
"owner/repo". Defaults to the officialclinTrialDatarelease repository.
Examples
# \donttest{
if (interactive()) {
# Download a study not bundled with the package
download_study("cdisc_pilot_extended")
# Then connect as usual
db <- connect_clinical_data("cdisc_pilot_extended")
}
# }
