hash_id: Generate a Stable Hash ID

View source: R/utils_ids.R

hash_idR Documentation

Generate a Stable Hash ID

Description

Creates a deterministic hash from one or more character inputs. Uses MD5 via base R's digest-like approach for a lightweight, dependency-free implementation.

Usage

hash_id(..., prefix = NULL)

Arguments

...

Character values to hash together. Concatenated with "|".

prefix

Optional prefix prepended to the hash (e.g., "RUN", "IND").

Value

A character string of the form prefix-hexhash or just hexhash.

Examples

hash_id("ADSL", "rule_001")
hash_id("my_study", "2024-01-01", prefix = "RUN")


r4subcore documentation built on Feb. 20, 2026, 5:09 p.m.