Alias for digest-based naming that avoids masking digest::digest
name_digest.RdCreates a naming function that uses a hash of the input for unique job names.
Examples
name_digest("my_job", list(x = 1, y = "a"))
#> function (element, index = NULL)
#> {
#> hash <- substr(digest::digest(element), 1, length)
#> if (nzchar(prefix)) {
#> sprintf("%s-%s", prefix, hash)
#> }
#> else {
#> hash
#> }
#> }
#> <bytecode: 0x55d7f315bbd0>
#> <environment: 0x55d7f315c650>