powered by
This function queries the NCBI E-utilities API to retrieve the total number of PubMed articles that match a given search term or R package name.
get_pubmed_count(package_name, api_key = getOption("pubmed.api_key", NULL))
An integer representing the total number of PubMed articles matching the search term, or NA if the request fails.
NA
A character string representing the search term (e.g., an R package name).
Optional. A character string with an NCBI API key. If not supplied, it will attempt to use the option getOption("pubmed.api_key").
getOption("pubmed.api_key")
if (FALSE) { get_pubmed_count("ggplot2") }
Run the code above in your browser using DataLab