This function retrieves different types of data (like 'PubMed' records, affiliations, 'iCites 'data, etc.) from 'PubMed' based on provided PMIDs. It supports parallel processing for efficiency.
A vector of PMIDs for which data is to be retrieved. For 'pmc_fulltext' endpoint,
provide full URLs instead (e.g., from pmid_to_pmc()$url).
A character vector specifying the type of data to retrieve ('pubtations', 'icites', 'pubmed_affiliations', 'pubmed_abstracts', 'pmc_fulltext').
Number of cores to use for parallel processing (default is 3).
Duration (in seconds) to pause after each batch
(Optional) NCBI API key for authenticated access.
Maximum elapsed seconds to allow each iCite batch before
skipping it and returning PMID-only rows. Defaults to the
puremoe.icite_timeout option, or 15 seconds if unset.
A data.table containing combined results from the specified endpoint.
For the 'pmc_fulltext' endpoint, provide full URLs to PMC tar.gz files.
Use pmid_to_pmc to convert PMIDs to PMC IDs and full URLs first.
pmids <- c("38136652")
results <- get_records(pmids, endpoint = "pubmed_abstracts", cores = 1)