Open rdmorin opened 1 year ago
Looks like an easy fix. I modified one line in this function to force the year to be cast as numeric.
parse_s2_paper_md <- function(out) {
out <- purrr::map_if(out, is.null, ~ NA_character_)
tibble::tibble(
abstract = out[["abstract"]],
arxiv_id = out[["arxivId"]],
authors = list(parse_s2_authors(out[["authors"]])),
citation_velocity = out[["citationVelocity"]],
citations = list(parse_s2_citations(out, "citations")),
doi = out[["doi"]],
influential_citation_count = out[["influentialCitationCount"]],
paper_id = out[["paperId"]],
references = list(parse_s2_citations(out, "references")),
title = out[["title"]],
topics = list(parse_s2_topics(out[["topics"]])),
url = out[["url"]],
venue = out[["venue"]],
year = as.numeric(out[["year"]])
)
}
Looks like the year class for the second paper is 'character' but it's numeric for most papers. Is this a known issue? Maybe it only affects certain (newer) versions of dplyr?