Learn R Programming

easyPubMed (version 3.1.6)

EPM_validate_fetch_params: 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)

Value

list including the vetted parameters.

Arguments

params

list of user-provided parameters.

Author

Damiano Fantini, damiano.fantini@gmail.com

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.

References

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

Examples

Run this code
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)




Run the code above in your browser using DataLab