This will convert all known (imagined) calls so that they have the same canonical format i.e., rnorm(n = 1, mean = 0, sd = 1)

harmonizeCall(callList, .callingEnv, .functionName = NULL)

Arguments

callList

A named list with elements call, usesDots and FUNorig

.callingEnv

The calling environment where Cache was called from

.functionName

A possible function name. If omitted, then it will be deduced from the callList and may be inaccurate.

Value

A named list. We illustrate with the example rnorm(1). The named list will have the original callList (call (the original call, without quote), FUNorig, the original value passed by user to FUN, and usesDots which is a logical indicating whether the ... are used), and appended with new_call (the harmonized call, with the function and arguments evaluated, e.g., (function (n, mean = 0, sd = 1) .Call(C_rnorm, n, mean, sd))(1)), func_call, the same harmonized call with neither function nor arguments not evaluated (e.g., rnorm(1)), func which will be function or method definition function (n, mean = 0, sd = 1) .Call(C_rnorm, n, mean, sd), and .functionName, which will be the function name as a character string (rnorm) either directly passed from the user's .functionName or deduced from the func_call.