
Last chance! 50% off unlimited learning
Sale ends in
Returns a list of PMID's for a provided Pubmed search
get_pmids_from_one_search(query, api_key)
A named list with 3 elements:
`$pubmed_search_success`, which is TRUE in the case that the
provided query was searched successfully on Pubmed and FALSE
otherwise.`$n_results`, the number of results for the search as reported
by Pubmed
`$pmids`, a list of PMID's corresponding to the Pubmed search
results for the query provided
A Pubmed search query
A valid Pubmed API key
if (FALSE) {
## Read in API key
ak <- readLines("api_key.txt")
## Download PMID's for search query
results <- get_pmids_from_one_search("Carlisle B[Author]", ak)
## Extract first result
results$pmids[1]
}
Run the code above in your browser using DataLab