Skip to contents

Scans a data frame for columns matching "doi" or "url" (case-insensitive) and transforms their string values into active HTML anchor tags (<a href="...">). It automatically protects existing full URLs inside the DOI column from being duplicated with the DOI resolver prefix.

Usage

format_hyperlinks(df)

Arguments

df

A data frame containing bibliographic data, typically generated by fetch_all_zotero_data().

Value

A data frame with the matched identifier columns transformed into HTML link strings.

Examples

if (FALSE) { # \dontrun{
# Assuming raw_data contains columns named 'DOI' and 'url'
clean_df <- format_hyperlinks(raw_data)
} # }