drks_de_download: Mass-download registry entry historical versions from DRKS.de

View source: R/drks_de_download.R

drks_de_downloadR Documentation

Mass-download registry entry historical versions from DRKS.de

Description

This function will download all DRKS.de registry records for the TRNs specified. Rather than transcribing TRNs by hand, it is recommended that you conduct a search for trials of interest using the DRKS.de web front-end and download the result as a comma-separated value (CSV) file. The download option labeled "CSV" on DRKS.de currently produces a zipped semicolon-delimited file, which must be unzipped before reading. The file can be read in to memory as a data frame and the drksId column can be passed directly to the function as the drksids argument.

Usage

drks_de_download(drksids, output_filename = NA, quiet = FALSE)

Arguments

drksids

A list of well-formed DRKS numbers, e.g. c("DRKS00005219", "DRKS00003170").

output_filename

A character string for a filename into which the dataframe will be written as a CSV, e.g. "historical_versions.csv". If no output filename is provided, the data frame of downloaded historical versions will be returned by the function as a data frame.

quiet

A boolean TRUE or FALSE. If TRUE, no messages will be printed during download. FALSE by default, messages printed for every version downloaded showing progress.

Value

If an output filename is specified, on successful completion, this function returns TRUE and otherwise returns FALSE. If an output filename is not specified, on successful completion, this function returns a data frame containing the historical versions of the clinical trial that have been retrieved, and in case of error returns FALSE. After unsuccessful completion, if the function is called again with the same NCT numbers and output filename, it will check the output file for errors in the download, remove them and try to download the historical versions again.

Examples


## Not run: 
filename <- tempfile()
drks_de_download(c("DRKS00005219", "DRKS00003170"), filename)

## End(Not run)

## Not run: 
hv <- drks_de_download("DRKS00005219")

## End(Not run)

cthist documentation built on April 8, 2022, 5:08 p.m.