Scholarly and Academic Identifier Utilities

Detects, normalizes, classifies, and extracts scholarly identifier strings, locates them in free text, gives keys for comparing and deduplicating them, and writes them as resolver URLs, CURIEs, or arXiv DOIs. Provides lightweight, dependency-free helpers for identifier types including DOIs, ORCID iDs, ISBNs, ISSNs, arXiv and PubMed identifiers, ROR and ISNI, OpenAlex and ADS bibcodes, RRID, ARK, SWHID, and selected life-science accessions (UniProt, RefSeq, SRA, GEO, BioProject, and genome assemblies). Functions are vectorized, predictable, and suitable as low-level building blocks for other R packages and data workflows. Use 'scholid_types()' for the authoritative type list. For online lookup, conversion, metadata retrieval, and linked identifier discovery, see 'scholidonline'.


scholid

R-CMD-check Codecov testcoverage CRANsince CRANdownloads CRANdownloads

scholid provides lightweight, dependency-free utilities for working with scholarly identifiers in R. The package is designed as a small, well-tested foundation that can be safely reused by other packages and data workflows. For the supported identifier types, see Scope and scholid_types().

See the full documentation at the scholid website.

For online lookup, conversion, metadata retrieval, and linked identifier discovery, see scholidonline.

Installation

Install the released version from CRAN:

install.packages("scholid")

Scope

The package focuses on common identifier systems used in scholarly communication:

  • DOI
  • arXiv
  • ADS bibcode
  • OpenAlex
  • Software Heritage (SWHID)
  • ARK
  • ISNI
  • ORCID iD
  • ROR
  • RRID
  • UniProt
  • RefSeq
  • SRA
  • GEO
  • BioProject
  • Genome assembly (GCA/GCF)
  • ISBN
  • ISSN
  • PubMed Central (PMCID)
  • PubMed (PMID)

Interface

User-available functions:

Function Purpose
scholid_types() List supported scholarly identifier types
is_scholid(x, type) Test whether values conform to a given identifier type
normalize_scholid(x, type) Normalize identifiers to canonical form
scholid_key(x, type) Give keys for comparing and deduplicating identifiers
format_scholid(x, type, as) Write identifiers as resolver URLs, CURIEs, or arXiv DOIs
extract_scholid(text, type) Extract identifiers of a given type from free text
locate_scholid(text, types) Find identifiers of several types in free text, with their positions
classify_scholid(x) Guess the identifier type of each input value
detect_scholid_type(x) Detect identifier types from canonical or wrapped input values

Examples

# list supported scholarly identifier types
scholid::scholid_types()
##  [1] "doi"        "arxiv"      "bibcode"    "openalex"   "swhid"     
##  [6] "ark"        "isni"       "orcid"      "ror"        "rrid"      
## [11] "uniprot"    "refseq"     "sra"        "geo"        "bioproject"
## [16] "assembly"   "isbn"       "issn"       "pmcid"      "pmid"
# test whether values match a given identifier type
scholid::is_scholid(
  x    = "10.1000/182",
  type = "doi"
)
## [1] TRUE
# normalize identifiers to canonical form
scholid::normalize_scholid(
  x    = "https://doi.org/10.1000/182",
  type = "doi"
)
## [1] "10.1000/182"
# give keys that match an ISBN-10 and its ISBN-13
scholid::scholid_key(
  x    = c("0306406152", "978-0-306-40615-7"),
  type = "isbn"
)
## [1] "9780306406157" "9780306406157"
# write identifiers as resolver URLs or CURIEs
scholid::format_scholid(
  x    = "PMID: 12345678",
  type = "pmid"
)
## [1] "https://pubmed.ncbi.nlm.nih.gov/12345678/"
scholid::format_scholid(
  x    = "0000-0002-1825-0097",
  type = "orcid",
  as   = "curie"
)
## [1] "orcid:0000-0002-1825-0097"
# extract identifiers of a given type from free text
scholid::extract_scholid(
  text = "See https://doi.org/10.1000/182 for details.",
  type = "doi"
)
## [[1]]
## [1] "10.1000/182"
# locate identifiers of all types in free text, with their positions
scholid::locate_scholid(
  text = "See doi:10.1000/182 and ISBN 978-0-306-40615-7."
)
##   element type                id             match start end
## 1       1  doi       10.1000/182       10.1000/182     9  19
## 2       1 isbn 978-0-306-40615-7 978-0-306-40615-7    30  46
# classify the identifier type of each input value
scholid::classify_scholid(
  x = c(
    "10.1000/182",
    "0000-0002-1825-0097",
    "not an id"
  )
)
## [1] "doi"   "orcid" NA
# detect identifier types from canonical or wrapped input values
scholid::detect_scholid_type(
  x = c(
    "https://doi.org/10.1000/182",
    "ORCID: 0000-0002-1825-0097",
    "arXiv:2101.00001",
    "not an id"
  )
)
## [1] "doi"   "orcid" "arxiv" NA

For more detailed usage patterns check out the Get started vignette.

License

MIT

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("scholid")

0.3.0 by Thomas Rauter, a day ago


https://thomas-rauter.github.io/scholid/, https://thomas-rauter.github.io/scholidonline/


Report a bug at https://github.com/Thomas-Rauter/scholid/issues


Browse source code at https://github.com/cran/scholid


Authors: Thomas Rauter [aut, cre, fnd] (ORCID:


Documentation:   PDF Manual  


MIT + file LICENSE license


Suggests testthat, knitr, rmarkdown


Imported by scholidonline.


See at CRAN