Movatterモバイル変換


[0]ホーム

URL:


digest: Hashrepresentations of arbitrary R objects

ciLicenseCRANDependenciesDebian packager-universeDownloads (monthly)Downloads (total)CRAN useCRAN indirectBioConductor useCode CoverageLast CommitDocumentation

Overview

The digest package provides a principal functiondigest() for the creation of hash digests of arbitrary Robjects (using the md5, sha-1, sha-256, crc32, xxhash, murmurhash,spookyhash, blake3, crc32c, xxh3_64, and xxh3_128 algorithms) permittingeasy comparison of R language objects.

Extensive documentation is available at thepackage documentationsite.

Examples

As R can serialize any object, we can rundigest() onany object:

R>library(digest)R>digest(trees)[1]"12412cbfa6629c5c80029209b2717f08"R>digest(lm(log(Height)~log(Girth),data=trees))[1]"e25b62de327d079b3ccb98f3e96987b1"R>digest(summary(lm(log(Height)~log(Girth),data=trees)))[1]"86c8c979ee41a09006949e2ad95feb41"R>

By using the hash sum, which is very likely to be unique, to identifyan underlying object or calculation, one can easily implement cachingstrategies. This is a common use of the digest package.

Other Functions

A small number of additional functions is available:

Note

Please note that this package is not meant to be deployed forcryptographic purposes. More comprehensive and widely tested librariessuch as OpenSSL should be used instead.

Installation

The package is onCRAN andcan be installed via a standard

install.packages("digest")

Continued Testing

As we rely on thetinytest package,the already-installed package can also be verified via

tinytest::test_package("digest")

at any later point.

Author

Dirk Eddelbuettel, with contributions by Antoine Lucas, JarekTuszynski, Henrik Bengtsson, Simon Urbanek, Mario Frasca, Bryan Lewis,Murray Stokely, Hannes Muehleisen, Duncan Murdoch, Jim Hester, Wush Wu,Qiang Kou, Thierry Onkelinx, Michel Lang, Viliam Simko, Kurt Hornik,Radford Neal, Kendon Bell, Matthew de Queljoe, Ion Suruceanu, BillDenney, Dirk Schumacher, Winston Chang, Dean Attali, and MichaelChirico.

License

GPL (>= 2)


[8]ページ先頭

©2009-2025 Movatter.jp