Searches PubMed for articles related to a set of PubMed ID's using NCBI's E-Utilities.
Usage
GetPubMedRelated(
id,
database = "pubmed",
batch.mode = TRUE,
max.results = 10,
return.sim.scores = FALSE,
return.related.ids = FALSE
)
Arguments
- id
either a character vector of PubMed ID's or a BibEntry object, which is expected to have at least some entries with
eprinttype = "pubmed"
and eprint field specifying a PubMed ID.- database
string; the Entrez database to search
- batch.mode
logical; if
TRUE
, the PubMed IDs inid
are combined by Entrez when searching for linked IDs so that only one set of linked IDs is returned. IfFALSE
, a set of linked IDs is obtained for each ID inid
. will be returned- max.results
numeric vector; the maximum number of results to return if
batch.mode
TRUE
; or ifbatch.mode
isFALSE
, this should have the same length asid
with each element giving the maximum number of results to return for the corresponding ID.- return.sim.scores
logical; Entrez returns a similarity score with each returned citation giving a measure of how similar the returned entry is to the ones specified by the query. If
TRUE
these scores are added to the returned BibEntry object in a field called ‘score’.logical; should the original PubMed ID(s) that a returned entry is related to be stored in a field called ‘PMIDrelated’.
See also
Other pubmed:
GetPubMedByID()
,
LookupPubMedID()
,
ReadCrossRef()
,
ReadPubMed()
Examples
if (interactive() && !httr::http_error("https://eutils.ncbi.nlm.nih.gov/")){
file.name <- system.file("Bib", "RJC.bib", package="RefManageR")
bib <- ReadBib(file.name)
bib <- LookupPubMedID(bib[[101:102]])
toBiblatex(GetPubMedRelated(bib, batch.mode = TRUE, max.results = 2,
return.sim.scores = TRUE, return.related.ids = TRUE))
GetPubMedRelated(bib, batch.mode = FALSE, max.results = c(2, 2))
}