Learn R Programming

easyPubMed (version 3.1.6)

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

Value

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

Arguments

x

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

Author

Damiano Fantini, damiano.fantini@gmail.com

References

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

Examples

Run this code
dt0 <- '20210312'
easyPubMed:::EPM_date_parse(dt0)



Run the code above in your browser using DataLab