Skip to content

Instantly share code, notes, and snippets.

@njahn82
Created September 9, 2021 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save njahn82/8e74558a2c86d1a5ea543015b79df896 to your computer and use it in GitHub Desktop.
Save njahn82/8e74558a2c86d1a5ea543015b79df896 to your computer and use it in GitHub Desktop.
doi check
library(tidyverse)
#> Warning: package 'tibble' was built under R version 4.1.1
#> Warning: package 'readr' was built under R version 4.1.1
library(biblids) # install via GitHub https://github.com/subugoe/biblids

tt <- readr::read_csv("~/Downloads/DOIs.txt")
#> Rows: 40479 Columns: 1
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): DOI
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

tt %>%
    mutate(doi_class = biblids::as_doi(DOI)) %>%
    filter(is.na(doi_class))
#> Warning: One or more parsing issues, see `problems()` for details
#> # A tibble: 51 × 2
#>    DOI                                                                 doi_class
#>    <chr>                                                               <doi>    
#>  1 www.accord.org.za/ajcr-issues/%EF%BF%BCcommunal-conflict-civil-war… NA       
#>  2 0.1103/PhysRevLett.109.211802                                       NA       
#>  3 10.1108                                                             NA       
#>  4 Routledge                                                           NA       
#>  5 0.1007/978-3-319-04651-8_4                                          NA       
#>  6 13:978-0-203-11137-6                                                NA       
#>  7 10.1017/ S1755691013000467                                          NA       
#>  8 0.1007/s10712-013-9262-y                                            NA       
#>  9 0.2478/slgr-2014-0015                                               NA       
#> 10 10.1177/ 0042098012452322                                           NA       
#> # … with 41 more rows

Created on 2021-09-09 by the reprex package (v2.0.0)

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