Learn R Programming

madrat (version 3.15.6)

cacheArgumentsHash: Tool: cacheArgumentsHash

Description

Calculate hash from given function arguments for given call

Usage

cacheArgumentsHash(call, args = NULL)

Value

A hash representing the given arguments hash for the given call. NULL, if no argument deviates from the default argument settings.

Arguments

call

A function as a string or symbol. Passing a vector of functions is possible, but is only intended for corresponding read/correct/convert functions. If multiple functions in a vector define arguments with the same name but different default values only the default defined in the first function is considered.

args

A list of named arguments used to call the given function(s). If duplicates of arguments exists the first occurrence of the argument will be used.

Author

Jan Philipp Dietrich

See Also

cachePut, cacheName, getNonDefaultArguments

Examples

Run this code
madrat:::cacheArgumentsHash("madrat:::readTau", args = list(subtype = "historical"))
madrat:::cacheArgumentsHash("madrat:::readTau", args = list(subtype = "paper"))
calls <- c(madrat:::readTau, madrat:::convertTau)
madrat:::cacheArgumentsHash(calls, args = list(subtype = "historical"))

Run the code above in your browser using DataLab