fingerprint: Tool: fingerprint

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/fingerprint.R


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 getMadratGraph. Will be created with getMadratGraph if not provided.


Additional arguments for getMadratGraph in case that no graph is provided (otherwise ignored)


A md5-based fingerprint of all provided sources


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

See Also



madrat:::fingerprint("toolGetMapping", package = "madrat")

madrat documentation built on Oct. 11, 2021, 9:10 a.m.