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.

calculate_hash(...)

Arguments

...

(any)
Objects to hash.

Value

(character(1)).

Examples

calculate_hash(iris, 1, "a")
#> [1] "9dec48c68dae0533"