get_metadata_from_one_pmid {pubmedtk}R Documentation

Downloads metadata from Pubmed API for a single provided PMID and exports

Description

Downloads metadata from Pubmed API for a single provided PMID and exports

Usage

get_metadata_from_one_pmid(pmid, api_key)

Arguments

pmid

A single PMID, e.g. "29559429"

api_key

A valid Pubmed API key

Value

A named list with 7 elements:

`$pubmed_dl_success`, which is TRUE in the case that a
corresponding Pubmed record was found and metadata
downloaded and FALSE otherwise.

`$doi`, a character string containing the DOI for the
publication with the PMID in question.

`$languages`, a list of languages corresponding to the
publication with the PMID in question.

`$pubtypes`, a list of publication types corresponding to the
publication with the PMID in question.

`$pubdate`, the listed publication date

`$epubdate`, the listed e-publication date

`$authors`, a list of authors of the publication with the PMID
in question.

`$abstract`, a character string containing the abstract for the
publication with the PMID in question.

Examples


## Not run: 
## Read in API key
ak <- readLines("api_key.txt")

## Download Pubmed metadata
mdata <- get_metadata_from_one_pmid("29559429", ak)

## Extract first author
mdata$authors[1]

## End(Not run)

[Package pubmedtk version 1.0.4 Index]