default_hash_fn {r2r} | R Documentation |
String hashes for arbitrary R objects
Description
generates string hashes for arbitrary R objects as follows.
This is the default hash function used by hashset
s and hashmap
s
objects.
Usage
default_hash_fn(key)
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
[Package r2r version 0.1.1 Index]