EPM_validate_fetch_params: Validate Parameters of a PubMed Retrieval Job.

View source: R/epm_all_fx.R

EPM_validate_fetch_paramsR Documentation

Validate Parameters of a PubMed Retrieval Job.

Description

Check and correct (if needed) the parameters of an easyPubMed retrieval job.

Usage

EPM_validate_fetch_params(params)

Arguments

params

list of user-provided parameters.

Details

The following elements are expected and/or parsed from the 'params' list:

  • 'encoding'. String, e.g. "UTF-8".

  • 'format'. String, must be one of the following values: ‘c(’uilist', 'medline', 'xml')'.

  • 'store_contents'. Logical, shall retrieved contents be stored in the object. If 'FALSE', the 'write_to_file' argument must be 'TRUE'.

  • 'write_to_file' Logical, shall retrieved contents be written to a file (or list of files). If 'FALSE', the 'store_contents' argument must be 'TRUE'.

  • 'outfile_path'. String, path to the folder where files will be written. This argument is evaluated only if 'write_to_file' is 'TRUE'.

  • 'outfile_prefix'. String, prefix of the files that will be written locally. This argument is evaluated only if 'write_to_file' is 'TRUE'.

  • 'api_key'. String, NCBI API key. Can be NULL.

  • 'max_records_per_batch'. Integer scalar (numeric vector of length 1), this is the maximum number of records retrieved per batch. It deafualts to 10,000.

  • 'verbose'. Logical, shall details about the progress of the operation be printed to console.

Value

list including the vetted parameters.

Author(s)

Damiano Fantini, damiano.fantini@gmail.com

References

https://www.data-pulse.com/dev_site/easypubmed/

Examples

prms <- list(
  encoding  = 'UTF-8', 
  format = 'xml', 
  api_key = NULL,
  store_contents = TRUE, 
  write_to_file = FALSE, 
  verbose = TRUE)
easyPubMed:::EPM_validate_fetch_params(prms)





dami82/easyPubMed documentation built on Jan. 4, 2024, 6:21 a.m.