Function which creates a unique fingerprint for a madrat function based on the code of the function itself, other madrat functions which are called by this function and of all source folders involved in the process. The fingerprint can serve as an indication whether the workflow for the given function has been most likely changed, or not. If all involved source folders and the code of all involved functions remains the same, also the fingerprint will stay the same, otherwise it will change. Hence, it can be to figure out whether a cache file can be used for further calculations, or whether the calculation should be redone.
fingerprint(name, details = FALSE, graph = NULL, ...)
Name of the function to be analyzed
Boolean indicating whether additional details in form of an attribute with underlying hash information should be added or not
A madrat graph as returned by
Additional arguments for
A fingerprint (hash) of all provided sources, or "fingerprintError"
For a better performance only the first 300 bytes of each file and the corresponding file size is hashed. As the fingerprint function only takes madrat-based functions into account (e.g. read-functions or calc-functions), but does ignore all other functions there might be cases where calculations actually changed, but the fingerprint is still the same. In a similar fashion it is possible that the fingerprint changes even though the workflow stayed the same (as the dependencies are sometimes overestimated).
Jan Philipp Dietrich, Pascal Führlich
madrat:::fingerprint("toolGetMapping", package = "madrat")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.