Learn R Programming

easyPubMed (version 3.1.6)

EPM_read_xml: Import PubMed Records Saved Locally in XML Format.

Description

Read the contents of an XML file and import Metadata and PubMed records for use by easyPubMed. The XML file must be generated by easyPubMed (ver >= 3) via the `epm_fetch()` function or via the `fetchEPMData()` method. XML files downloaded from the Web or using other software are currently unsupported. This function can only process one file.

Usage

EPM_read_xml(x)

Value

List including four elements: `guide` (data.frame), `meta` (list), `job_info` (data.frame) and `contents` (named list).

Arguments

x

Path to an XML file on the local machine.

Author

Damiano Fantini, damiano.fantini@gmail.com

References

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

Examples

Run this code
if (FALSE) {
  x <- epm_query(query_string = 'easyPubMed', verbose = TRUE)
  x <- epm_fetch(x = x, write_to_file = TRUE, store_contents = FALSE, 
                 outfile_prefix = 'qpm_qry_', verbose = TRUE)
  y <- EPM_read_xml(x = 'qpm_qry__batch_01.txt')
  try(unlink('qpm_qry__batch_01.txt'), silent = TRUE)
  y
}



Run the code above in your browser using DataLab