Get the publication year for a PMID

pmid2pubyear(pmid)

Arguments

pmid

character. A PubMed ID.

Value

A character containg the publication year for the given pmid.

Examples

 pmid2pubyear("32026945")
#> [1] "2021"