default_hash_fn: String hashes for arbitrary R objects

Description Usage Arguments Details Value Author(s)

View source: R/default_hash_fn.R

Description

generates string hashes for arbitrary R objects as follows. This is the default hash function used by hashsets and hashmaps objects.

Usage

1

Arguments

key

an arbitrary R object.

Details

If key is an atomic vector (as tested by is.atomic(key)) of length one, default_hash_fn(key) simply coerces the input to character. For more complex inputs, the function calls digest(key) from the digest package.

Value

a character vector of length one. Hash digest of key.

Author(s)

Valerio Gherardi


r2r documentation built on July 6, 2021, 5:12 p.m.