| hash {tinycache} | R Documentation |
Hash an R Object
Description
Computes a fast, well-mixed 128-bit (32 hex character) hash of
an R object, similar to rlang::hash(). Unlike hashing
serialize(x, connection = NULL) (see hash_raw()), this walks the
object's type, length, data bytes, and attributes directly, so it never
allocates a serialized byte buffer. Supports atomic vectors (logical,
integer, double, character, raw), lists, and their attributes meaning that it
covers data frames, factors, and nested lists thereof. Other types (e.g.
closures, environments, S4 objects) are not supported.
Usage
hash(x)
Arguments
x |
An R object to hash. |
Value
A 32-character lowercase hex string.