
Hash R objects with numeric rounding (digest's sha1 generic, natively)
Source:R/digest_native.R
morie_sha1.RdDoubles are written as hexadecimal mantissa/exponent with digits
significant digits and zapsmall small-value flooring, so that the
hash is the same across platforms; every method and attribute rule of
digest::sha1() is reproduced.
Examples
morie_sha1(c(1.1, 2.2, pi))
#> [1] "49450d33079178d1bd94deb16ad837dea96ec543"
morie_sha1(data.frame(a = 1:3, b = c("x", "y", "z")))
#> [1] "94e9463c086dcba7aea01ff4991d7ec8fcc8c55e"