generate_id: Generate unique identifier(s)

Description Usage Arguments Value Examples

View source: R/generate_id.R

Description

Convenience function to generate a unique identifiers for sources, assertions, justifications, and decisions.

Usage

1
2
3
4
5
generate_id(
  type,
  prefix = paste(sample(letters, 4), collapse = ""),
  stopOnIllegalChars = FALSE
)

Arguments

type

The type of the justifier object; D, J, A or S.

prefix

An identifier prefix.

stopOnIllegalChars

Whether to base::stop() or produce a base::warning() when encountering illegal characters (i.e. anything other than a letter or underscore).

Value

A character vector containing the identifier(s).

Examples

1
2
generate_id(type = "S", 'sourceExample');
generate_id(type = "A", 'assertionExample');

Matherion/justifier documentation built on Dec. 31, 2020, 3:13 p.m.