Closed buyske closed 4 years ago
Hi Steve,
thanks for reporting this issue. As you pointed out, there was a bug in article_to_df(). This has been fixed. Also, let me confirm that the date field being extracted from the record is the [PubDate] and NOT the [DateCompleted] field (as I erroneously mentioned before. Again, thanks for using easyPubMed and reporting this issue.
get_pubmed_ids(27463701) %>% fetch_pubmed_data() %>% article_to_df(getAuthors = FALSE) %>% select(pmid, doi, year, month, day, jabbrv)
Note that the day is missing but it is imputed to 1.
article_to_df() was updated, and the bug was fixed. The following code now returns the expected result, i.e. "10".
get_pubmed_ids(27463701) %>% fetch_pubmed_data() %>% article_to_df(getAuthors = FALSE) %>% pull(month)
The article_to_df function seems to convert at least some October publication dates to a value of month equal to 0. For example,
get_pubmed_ids(27463701) %>% fetch_pubmed_data() %>% article_to_df(getAuthors = FALSE)
shows the correct year, but the month is given as 0 instead of 10.