cache.save: Save Cache (Alternate) Saves the arguments to a cache file,...

cache.saveR Documentation

Save Cache (Alternate) Saves the arguments to a cache file, using the cache.num last checked with cache.ok. This function provides an alternative syntax more aligned with other functions that start with "cache.".

Description

Save Cache (Alternate)

Saves the arguments to a cache file, using the cache.num last checked with cache.ok. This function provides an alternative syntax more aligned with other functions that start with "cache.".

Usage

cache.save(...)

Arguments

...

Objects to save.

Examples

# check the first cache to see if it exists and dependent files haven't changed.
# if this check is TRUE, code in brackets will get skipped and the cache will be loaded instead.
# set do.load = FALSE if you have multiple files that build a cache, 
#    to prevent multiple cache loads.
# output will be printed to the console to tell you if the cache was loaded or re-built.
## Not run: 
  if( ! cache.ok(1) ){

    # do stuff
  
    # if this is the final file for this cache, 
    #   end with cache.save to save passed objects as a cache.
    cache.save(iris)

  }


## End(Not run)

oliver-wyman-actuarial/easyr documentation built on Jan. 27, 2024, 4:37 a.m.