Skip to contents

Strips resolver prefixes (https://doi.org/, doi:), lowercases, and trims trailing punctuation, following Crossref's canonicalization guidance. Empty results become NA.

Usage

normalize_doi(x)

Arguments

x

A character vector of DOIs.

Value

A character vector of normalized DOIs, with NA for unparseable input.

Examples

normalize_doi("https://doi.org/10.1234/ABC. ")
#> [1] "10.1234/abc"
normalize_doi("doi:10.1016/S0140-6736(97)11096-0")
#> [1] "10.1016/s0140-6736(97)11096-0"