extract_publications: Takes a data frame of the type provided by
clinicaltrials_gov_download() and returns a new data frame
containing one row per publication of the publication type
specified indexed on ClinicalTrials.gov for every version of the
clinical trial record provided.
Description
This function does not connect to ClinicalTrials.gov, and only
interprets data that has already been downloaded by expanding the
nested JSON-encoded data in the references column provided by
clinicaltrial_gov_version.
A data frame with all the original columns, as well as an
additional three columns: pmid, type and citation. The
new data frame will have one row per publication.
Arguments
df
A data frame containing at least the following columns:
nctid, version_number, total_versions, version_date,
and references. The references column should contain a
nested JSON-encoded table with three columns: pmid, type
and citation. This data frame can be generated by the use of
clinicaltrials_gov_download.
types
A list of types to be returned or a character string
if only one type specified, e.g. "RESULT" or c("RESULT",
"BACKGROUND"). Allowed types: "RESULT", "BACKGROUND",
"DERIVED".