Skip to content

Instantly share code, notes, and snippets.

@njahn82
Last active April 15, 2025 20:23
Show Gist options
  • Save njahn82/8ff5f6fa338f52be28e2086f4cd4a0ed to your computer and use it in GitHub Desktop.
Save njahn82/8ff5f6fa338f52be28e2086f4cd4a0ed to your computer and use it in GitHub Desktop.
rcrossref purrr
library(purrr)
library(rcrossref)

my_dois <- c("ieieie", "10.7717/peerj.2323")

map(my_dois, purrr::possibly(rcrossref::cr_works), .progress = TRUE) |> map_df("data")
#> Warning: 404 (client error): /works/ieieie - Resource not found.
#> # A tibble: 1 × 32
#>   alternative.id     archive_ na.    na..1   container.title created   deposited
#>   <chr>              <chr>    <chr>  <chr>   <chr>           <chr>     <chr>    
#> 1 10.7717/peerj.2323 CLOCKSS  LOCKSS Portico PeerJ           2016-08-… 2019-09-…
#> # ℹ 25 more variables: published.online <chr>, doi <chr>, indexed <chr>,
#> #   issn <chr>, issued <chr>, member <chr>, page <chr>, prefix <chr>,
#> #   publisher <chr>, score <chr>, source <chr>, reference.count <chr>,
#> #   references.count <chr>, is.referenced.by.count <chr>, title <chr>,
#> #   type <chr>, url <chr>, volume <chr>, abstract <chr>, language <chr>,
#> #   author <list>, funder <list>, link <list>, license <list>, reference <list>

Created on 2025-04-15 with reprex v2.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment