EPM_date_parse: Parse and Format a Pubmed Date Field.

View source: R/epm_all_fx.R

EPM_date_parseR Documentation

Parse and Format a Pubmed Date Field.

Description

Extract Date Information form a slice of a raw XML PubMed record. Day, month and year are returned. Months are recoded as numeric if needed (e.g., 'Oct' and 'October' are converted to 10). If month and/or day information are missing, these are imputed to 1. If the year is missing, NA is returned.

Usage

EPM_date_parse(x)

Arguments

x

String (character vector of length 1) including an XML date field from a PubMed record.

Value

list including n=3 numeric elements: day, month and year.

Author(s)

Damiano Fantini, damiano.fantini@gmail.com

References

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

Examples

dt0 <- '<Year>2021</Year><Month>03</Month><Day>12</Day>'
easyPubMed:::EPM_date_parse(dt0)




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