ctgov_get_latest_snapshot: Get the Latest Daily Snapshot from clinicaltrials.gov

View source: R/snap.R

ctgov_get_latest_snapshotR Documentation

Get the Latest Daily Snapshot from clinicaltrials.gov

Description

This function does the following. 1. Downloads the latest zip file containing pipe-delimited file from https://aact.ctti-clinicaltrials.org/pipe_files. 2. Unzips the zip file. 3. Creates a duckdb database from the unzipped, pipe-delimited files. 4. Creates a derived duckdb database used by the package for querying and including other calculated features.

Usage

ctgov_get_latest_snapshot(
  db_path = "ctgov.duckdb",
  db_derived_path = "ctgov-derived.duckdb",
  tmp_dir = tempdir(),
  cleanup = TRUE,
  verbose = TRUE,
  ask_understand = TRUE
)

Arguments

db_path

the path where the database should be written to.

db_derived_path

the path where the derived database should be written to.

tmp_dir

the temporary directory where the zip file should be stored along with the unzipped pipe-delimited files.

cleanup

logical flag; should the zip and pipe-delimted files be removed after the databases have been created? (Default is 'TRUE')

verbose

logical flag; should progress messages be printed? (Default is 'TRUE')

ask_understand

logical flag; does the user have to answer whether or not they understand they are going to download the database?


presagia-analytics/ctrialsgov documentation built on March 25, 2024, 2:10 p.m.