R: Calculate a Hash for Multiple Objects

calculate_hash {mlr3misc} | R Documentation

## Calculate a Hash for Multiple Objects

### Description

Calls `digest::digest()` to calculate the hash for all objects provided.

The following operations are performed to make hashing more robust:

- If an object is a `function()`, the formals and the body are hashed separately. This ensures that the bytecode or parent environment are not be included in the hash.

- If an object is a `data.table::data.table()`, the data.table is converted to a regular list. This ensures that keys and indices are not included in the hash.

Note that this only applies to top level objects, these transformations are not done recursively.

### Usage

    calculate_hash(...)

### Arguments

`...` | (any) Objects to hash.

### Value

(`character(1)`).

### Examples

    calculate_hash(iris, 1, "a")

[Package mlr3misc version 0.10.0 Index]