Skip to content

Instantly share code, notes, and snippets.

@njahn82
Created May 29, 2018 16:01
Show Gist options
  • Select an option

  • Save njahn82/9b6247292d32c5cb0aeb00279e003ed5 to your computer and use it in GitHub Desktop.

Select an option

Save njahn82/9b6247292d32c5cb0aeb00279e003ed5 to your computer and use it in GitHub Desktop.
Unnest rcrossref example
library(tidyverse)
library(rcrossref)
rcrossref::cr_works(query = "bernd weisshaar") %>%
  .$data %>%
  select(DOI, author) %>%
  mutate(author_df = map(author, as_data_frame)) %>%
  unnest(author_df)
## # A tibble: 40 x 6
##    DOI                 given     family  sequence  ORCID authenticated.or…
##    <chr>               <chr>     <chr>   <chr>     <chr> <lgl>            
##  1 10.1023/a:10119029… Katharina Schnei… first     <NA>  NA               
##  2 10.1023/a:10119029… Bernd     Weissh… addition… <NA>  NA               
##  3 10.1023/a:10119029… Dietrich… Borcha… addition… <NA>  NA               
##  4 10.1023/a:10119029… Francesco Salami… addition… <NA>  NA               
##  5 10.1007/978-1-4419… Bekir     Ülker   first     <NA>  NA               
##  6 10.1007/978-1-4419… Bernd     Weissh… addition… <NA>  NA               
##  7 10.3410/f.7549956.… Bernd     Weissh… first     <NA>  NA               
##  8 10.1023/a:10059219… Ulrike    Hartma… first     <NA>  NA               
##  9 10.1023/a:10059219… William … Valent… addition… <NA>  NA               
## 10 10.1023/a:10059219… John M.   Christ… addition… <NA>  NA               
## # ... with 30 more rows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment