get_pmids_from_one_search {pubmedtk}R Documentation

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)

Arguments

query

A Pubmed search query

api_key

A valid Pubmed 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

Examples


## Not run: 
## 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]

## End(Not run)

[Package pubmedtk version 1.0.4 Index]