In bibliometric analysis, we frequently work with specialised identifiers, such as Digital Object Identifiers (DOIs) or Research Organisation Registry IDs (RORs). The goal of biblids is to help you work with these identifiers.
Biblids implements bibliometric identifiers as S3 classes based on the vctrs package. These object-oriented (OO) extensions teach R what, for example, a DOI is.
You don’t have to know anything about OO, vctrs or even S3 to use biblids. Bibliographic identifiers should just work as you might expect them to. For example, with biblids, R “understands” that 10.1038/nphys1170
, https://doi.org/10.1038/nphys1170
and 10.1038/NPHYS1170
are all the same DOI.
Each bibliometric identifier comes with a family of functions:
doi()
for the biblids_doi
class.as_doi()
.str_extract_all_doi()
as well as the underlying regular expressions regex_doi()
.is_doi()
) or could be (is_doi_ish()
) a bibliometric ID.doi_examples()
.format()
), logic (is.na()
) or arithmetic.For large sets of identifiers (such as the DOIs), only the syntax is validated. For smaller sets (such as RORs), the package ships with datasets including presently valid identifiers, or wrappers to pull such information from external sources.
Biblids is designed to be lightweight and comes with minimal Imports
dependencies. To install the package with minimal dependencies run:
remotes::install_github("subugoe/biblids")
Additional features are enabled when you have Suggests
packages installed. Install these extended dependencies by running:
remotes::install_github("subugoe/biblids", dependencies = TRUE)
Bibliographic IDs are displayed appropriately in various output formats, such as inside knitr/rmarkdown documents and tibble tables. For example, knit_print.biblids_doi()
will automatically render DOIs appropriately.
You can rely on ready-made, well-tested shiny input modules to ingest and validate bibliographic identifiers. This may be helpful inside a bibliographic dashboard or another shiny app, where users can supply their own data for an analysis.
For example, you can ingest DOIs using doiEntryApp()
.
Biblids also includes some API clients to resolve bibliomatric IDs and query related databases.
These clients are minimal API clients in the spirit of gh. They do not comprehensively duplicate external APIs in an R interface.
These wrappers are limited:
They come in two forms:
You can use a thin wrapper around httr two write your own queries. These will usually return a deeply nested list for you to wrangle.
For example, you can “roll your own” query withget_doi_handles()
.You can use some ready-made R functions with common queries baked in. These will usually return a simple vector.
For example, you can test whether a doi has been published with is_doi_found()
, or retrieve the resolved URL resolve_doi()
.