50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

SpaDES (version 1.0.1)

makeDigestible: Remove any reference to environments in a simList

Description

Internal use only. Used when caching a SpaDES run a simList.

Usage

makeDigestible(simList)

## S3 method for class 'simList':
makeDigestible(simList)

Arguments

simList
an object of class simList

Value

  • A simplified version of the simList object, but with no reference to any environments

Details

This is a derivative of the class simList, except that all references to local environments are removed. Specifically, all functions (which are contained within environments) are converted to a text representation via a call to format(fn). Also the objects that were contained within the .envir slot are hashed using digest in the digest package. Also, paths slot is not used to allow comparison across platforms and it is not relevant where the objects are gotten from, so long as the objects are the same. The .envir slot is emptied (NULL). The object is then converted to a simList_ which has a .list slot. The hashes of the objects are then placed in that .list slot.

See Also

cache. digest.