## Example 01: retrieve PubMed record Unique Identifiers (uilist)
# Note: a time limit can be set in order to kill the operation when/if
# the NCBI/Entrez server becomes unresponsive.
setTimeLimit(elapsed = 4.9)
try({
q <- 'Damiano Fantini[AU] AND "2018"[PDAT]'
x <- get_pubmed_ids(pubmed_query_string = q)
y <- fetch_pubmed_data(x, format = "uilist")
y
}, silent = TRUE)
setTimeLimit(elapsed = Inf)
if (FALSE) {
## Example 02: retrieve data in XML format
q <- 'Damiano Fantini[AU] AND "2018"[PDAT]'
x <- epm_query(query_string = q)
y <- fetch_pubmed_data(x, format = "xml")
y
}
Run the code above in your browser using DataLab