add_HTMLink: Generate HTML links using a document identifier

View source: R/add_HTMLink.R

add_HTMLinkR Documentation

Description

add_HTMLink() adds a column to the passed tibble, containing the HTML Link corresponding to the document identifier provided.

Usage

add_HTMLink(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_HTMLink function generates the HTML link for the following supported document identifier standards:

  • DOI (Digital Object Identifier)

  • PMID (PubMed ID)

The add_HTMLink 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 HTML Link(s).


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