SpaDES (version 1.3.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)

# S4 method for 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::digest. The paths slot is not used (to allow comparison across platforms); it's not relevant where the objects are gotten from, so long as they 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.