fetch_batch: Fetch a batch of records

Description Usage Arguments Value Examples

View source: R/fetch_batch.R

Description

Batch IDs to account for Eutils server limits

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
fetch_batch(
  esearch,
  batch_start = 1,
  records_max = NULL,
  batch_size = 10000,
  save_file = TRUE,
  dir = here::here(),
  file_name = esearch$QueryTranslation,
  quiet = FALSE
)

Arguments

esearch

Esearch object. Generally the output of search_get_pmids or check_update_esearch.

batch_start

Record batch should start with. Default to 1.

records_max

Max records to fetch. Defaults to NULL and dynamically set to max of esearch query.

batch_size

Maximum batch size. Defaults to 10000, which is eutilities' limit.

save_file

Whether batch should be saved as raw characters to file. Defaults to TRUE.

dir

Directory for saving files. Default to project root (here::here())

file_name

Root for file names. Default to esearch query.

quiet

Whether to silence messages in console. Defaults to FALSE.

Value

Efetch object as raw characters

Examples

1
2
3
4
5
6
7
## Not run: 
# Run search and don't save any output
records_search <- search_get_pmids(term = "aquilegia[TITLE]",
                                   dir = NULL, output = NULL)
batch <- fetch_batch(records_search)

## End(Not run)

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