Thanks Ivan and Iris for your solutions, I'll look over them.
The solution that I came up with last night involves creating a
function that has the same formals signature as the wrapped function
and relying on `environment()` and `list(...)` to return a function's
variables at the beginning of the
В Sat, 17 Feb 2024 11:15:43 -0700
"Reed A. Cartwright" пишет:
> I'm wrapping a function in R and I want to record all the arguments
> passed to it, including default values and missing values.
This is hard if not impossible to implement for the general case
because the default arguments are eval
Hi Reed,
I need to stress before giving my answer that no solution can handle
everything. These scenarios will always lead to problems:
* if any of the formal arguments rely on the current state of the call stack
* if any of the formal arguments rely on a variable that is only
defined later in
I'm wrapping a function in R and I want to record all the arguments
passed to it, including default values and missing values. I want to
be able to snoop on function calls in sourced scripts as part of a
unit testing framework.
I can capture the values fine, but I'm having trouble evaluating them
4 matches
Mail list logo