This function searches PubMed using the NCBI E-utilities API via the rentrez package. The implementation includes optimizations for speed, memory efficiency, and reliability.
pubmed_search(
query,
max_results = 1000,
use_mesh = FALSE,
date_range = NULL,
api_key = NULL,
batch_size = 200,
verbose = TRUE,
use_cache = TRUE,
retry_count = 3,
retry_delay = 1
)A data frame containing the search results with PubMed IDs, titles, and other metadata.
Character string containing the search query.
Maximum number of results to return.
Logical. If TRUE, will attempt to map query terms to MeSH terms.
Character vector of length 2 with start and end dates in format "YYYY/MM/DD".
Character string. NCBI API key for higher rate limits (optional).
Integer. Number of records to fetch in each batch (default: 200).
Logical. If TRUE, prints progress information.
Logical. If TRUE, cache results to avoid redundant API calls.
Integer. Number of times to retry failed API calls.
Integer. Initial delay between retries in seconds.