Learn R Programming

rcrossref (version 0.3.0)

pmid2doi: Get a PMID from a DOI, and vice versa.

Description

Get a PMID from a DOI, and vice versa.

Usage

pmid2doi(x, simplify = FALSE, ...)

doi2pmid(x, simplify = FALSE, ...)

Arguments

x
(character) One or more DOIs or PMIDs
simplify
(logical) Whether to simplify result to vector.
...
Curl args passed on to GET.

References

Uses the http://www.pmid2doi.org/ REST API. Its currently unavailable.

Examples

Run this code
# get a pmid from a doi
# doi2pmid("10.1016/0006-2944(75)90147-7")

# More examples
## dois to pmids
# doi2pmid("10.1016/0006-2944(75)90147-7", TRUE)
# doi2pmid(c("10.1016/0006-2944(75)90147-7","10.1186/gb-2008-9-5-r89"))

## pmids to dois
# pmid2doi(18507872)
# pmid2doi(18507872, TRUE)
# pmid2doi(c(1,2,3))

## pass in curl options
# library('httr')
# pmid2doi(18507872, config=verbose())

Run the code above in your browser using DataLab