Skip to content

Instantly share code, notes, and snippets.

@njahn82
Last active January 22, 2018 15:51
Show Gist options
  • Select an option

  • Save njahn82/748f28b87b924f8a903e7105e99160b1 to your computer and use it in GitHub Desktop.

Select an option

Save njahn82/748f28b87b924f8a903e7105e99160b1 to your computer and use it in GitHub Desktop.
Crossref Citation
cr_cites <- function(doi) {
tt <- rcrossref::cr_works_(doi) %>%
jsonlite::fromJSON() %>%
.$message
dplyr::data_frame(doi, `is-referenced-by-count` = tt$`is-referenced-by-count`)
}
my_response <- purrr::map(dois, purrr::safely(cr_cites))
my_df <- purrr::map_df(my_response, "result")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment