Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


pubmedtk (version 1.0.4)

get_pmids_from_one_search: Returns a list of PMID's for a provided Pubmed search

Description

Returns a list of PMID's for a provided Pubmed search

Usage

get_pmids_from_one_search(query, api_key)

Value

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

Arguments

query

A Pubmed search query

api_key

A valid Pubmed API key

Examples

Run this code

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