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)