batch_fetch_pubmed_records: Get PMIDs and full PubMed records

Description Usage Arguments Value Examples

View source: R/batch_fetch_pubmed_records.R

Description

Get PMIDs and full PubMed records. NOTE: silently drop DOIs without PMIDs (i.e., DOIs *not* in PubMed) NOTE: Output is unparsed XML saved as ".txt" files, so that user can choose to parse with 'XML' or 'xml2' packages.

Usage

1
batch_fetch_pubmed_records(query_string, batch_size = 100)

Arguments

query_string

Character vector of one or more PubMed query strings. Generally the output of create_query_strings.

batch_size

Number of DOIs to include per batch. Default = 100.

Value

Character vector of length number of batches (length query_string) of unparsed XML with root node "PubmedArticleSet"

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Fetch a single PubMed batch
my_query_single <- '"10.3389/fpsyt.2018.00207"[DOI] OR "10.1186/s40779-018-0166-5"[DOI] OR "10.1186/s12959-018-0173-5"[DOI] OR "10.1103/PhysRevD.97.096016"[DOI] OR "10.1038/d41586-018-05113-0"[DOI]'

## Not run: 
batch_fetch_pubmed_records(my_query_single)

## End(Not run)

# Fetch a multiple PubMed batches
my_query_multi <- c('"\"10.3389/fpsyt.2018.00207\"[DOI] OR \"10.1186/s40779-018-0166-5\"[DOI] OR \"10.1186/s12959-018-0173-5\"[DOI]"', '"\"10.1103/PhysRevD.97.096016\"[DOI] OR \"10.1038/d41586-018-05113-0\"[DOI]"')
## Not run: 
batch_fetch_pubmed_records(my_query_multi, batch_size = 3)

## End(Not run)

maia-sh/pubmedparser documentation built on Feb. 18, 2021, 11:44 a.m.