add_URL: Generate URLs using document identifiers

View source: R/add_URL.R

add_URLR Documentation

Generate URLs using document identifiers

Description

add_URL() adds a column to the passed tibble, containing the URL corresponding to the document identifier provided.

Usage

add_URL(timber)

Arguments

timber

a tibble of timber, with a table built by build_table.

Details

A document identifier is a unique sequence of letters and/or numbers assigned to a published work to facilitate its unambiguous reference. Generally, these identifiers allow for a given work to be assigned a standardized URL. The add_URL function generates the URL for the following supported document identifier standards:

  • DOI (Digital Object Identifier)

  • PMID (PubMed ID)

The add_URL function works by detecting the appropriate document identifier type, using regular expressions. The DOI is identified as beginning with two numerical digits, followed by a period, four or five numerical digits, and a forward slash. The PMID is a series of eight numerical digits. There is no additional validation done; while a non-DOI is unlikely to be inadvertently recognized as a DOI, a non-PMID string of eight numbers could easily be mistaken.

Value

The passed tibble of timber with an additional column containing URL(s).


iAM-AMR/sawmill documentation built on June 30, 2024, 2:25 a.m.