| hashCheck {Hmisc} | R Documentation |
hashCheck
Description
Check for Changes in List of Objects
Usage
hashCheck(..., file, .print. = TRUE, .names. = NULL)
Arguments
... |
a list of objects including data frames, vectors, functions, and all other types of R objects that represent dependencies of a certain calculation |
file |
name of file in which results are stored |
.print. |
set to |
.names. |
vector of names of original arguments if not calling |
Details
Given an RDS file name and a list of objects, does the following:
makes a vector of hashes, one for each object. Function objects are run through
deparseso that the environment of the function will not be considered.see if the file exists; if not, return a list with result=NULL,
hash= new vector of hashes,changed='All'if the file exists, read the file and its hash attribute as
prevhashif
prevhashis not identical to hash: if.print.=TRUE(default), print to console a summary of what's changed return a list with result=NULL,hash= new hash vector, changedif
prevhash = hash, return a list with result=file object,hash=new hash, changed=”
Set options(debughash=TRUE) to trace results in /tmp/debughash.txt
Value
a list with elements result (the computations), hash (the new hash), and changed which details what changed to make computations need to be run
Author(s)
Frank Harrell