This is intended to be used within the Cache function, but can be used to evaluate what a simList would look like once it is converted to a repeatably digestible object.

# S4 method for simList
.robustDigest(object, objects, length = 1e+06,
  algo = "xxhash64", quick = getOption("reproducible.quick", FALSE),
  classOptions = list())



an object to digest.


Optional character vector indicating which objects are to be considered while making digestible. This argument is not used in the default cases; the only known method that uses this in the default cases; the only known method that uses this argument is the simList class from SpaDES.core.


Numeric. If the element passed to Cache is a Path class object (from e.g., asPath(filename)) or it is a Raster with file-backing, then this will be passed to digest::digest, essentially limiting the number of bytes to digest (for speed). This will only be used if quick = FALSE.


The algorithms to be used; currently available choices are md5, which is also the default, sha1, crc32, sha256, sha512, xxhash32, xxhash64 and murmur32.


Logical. If TRUE, little or no disk-based information will be assessed, i.e., mostly its memory content. This is relevant for objects of class Path and Raster currently. For class Path objects, the file's metadata (i.e., filename and file size) will be hashed instead of the file contents. If set to FALSE (default), the contents of the file(s) are hashed. If quick = TRUE, length is ignored. NOTE: this argument is experimental and may change in future releases.


Optional list. This will pass into .robustDigest for specific classes. Should be options that the .robustDigest knows what to do with.


See robustDigest. This method strips out stuff from a simList class object that would make it otherwise not reproducibly digestible between sessions, operating systems, or machines. This will likely still not allow identical digest results across R versions.

See also