EPM_reference_parse: Parse and Format References.

View source: R/epm_all_fx.R

EPM_reference_parseR Documentation

Parse and Format References.

Description

Extract Reference Information form a raw XML string, typically extracted from a PubMed record. Users can select the type of identifier to extract and return, as well as the maximum number of references to be returned.

Usage

EPM_reference_parse(x, max_references = 100, id_type = "pmid")

Arguments

x

String (character vector of length 1) including a List of references obtained from a PubMed record.

max_references

Numeric (of length 1). Maximum number of references to extract/include. This should be an integer '>=0'.

id_type

String (character vector of length 1). Type of identifier to be used for references. One of the following values is expected: ‘c(’pmid', 'doi', 'pmc')'.

Value

data.frame including one row for each author and n=4 columns: lastname, forename, address and email.

Author(s)

Damiano Fantini, damiano.fantini@gmail.com

References

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

Examples

ref <- paste0('<xml><Reference><Citation>',
              '<ArticleId IdType=\"pubmed\">25822800</ArticleId>',
              '<ArticleId IdType=\"pmc\">PMC4739640</ArticleId>',
              '</Citation></Reference></xml>')
easyPubMed:::EPM_reference_parse(ref)
easyPubMed:::EPM_reference_parse(ref, id_type = 'pmc')


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