ct_read_trial: Read commonly used information from ClinicalTrials.gov

Description Usage Arguments Value Examples

View source: R/ct_read_trial.R

Description

Returns the commonly used information from ClinicalTrials.gov.

Usage

1
ct_read_trial(NCT, export_format = "csv")

Arguments

NCT

The NCT code of a study as a character, e.g. "NCT03478891".

export_format

The format of the output as a string. Either "csv" or "xml".

Value

If the selected format is "csv", a dataframe with the commonly used fields; if a field was not found within the file, then this field will be empty, i.e. 'character()'. If the selected format is "xml", then it returns the trial in xml_document format.

Examples

1
2
3
4
5
6
7
## Not run: 
# Get the XML of study NCT03478891
xml_document <- ct_read_trial("NCT03478891", export_format = "xml")
# Extract fields of interest
study <- ct_read_trial("NCT03478891", export_format = "csv")

## End(Not run)

serghiou/clinicaltrialr documentation built on Dec. 27, 2021, 10:53 a.m.