EPM_read_xml: Import PubMed Records Saved Locally in XML Format.

View source: R/epm_all_fx.R

EPM_read_xmlR Documentation

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)

Arguments

x

Path to an XML file on the local machine.

Value

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

Author(s)

Damiano Fantini, damiano.fantini@gmail.com

References

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

Examples

## Not run: 
  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

## End(Not run)




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