# 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({
q0 <- 'Damiano Fantini[AU] AND "2018"[PDAT]'
q1 <- easyPubMed::get_pubmed_ids(pubmed_query_string = q0)
q2 <- fetch_pubmed_data(pubmed_id_list = q1)
df <- table_articles_byAuth(q2, included_authors = 'first')
df[, c('pmid', 'lastname', 'jabbrv', 'year', 'month', 'day')]
}, silent = TRUE)
setTimeLimit(elapsed = Inf)
Run the code above in your browser using DataLab