spy: Spy on the arguments used

Description Usage Value

View source: R/spy.R

Description

This function is to be used inside of a target function, and it will then record the full set of formals for that function and in addition will it store the corresponding list of all the arguments that were used when the function was called, both defaulted values and user specified values. The main reason for this function is to ensure that the bootstrap-wrapper simply can replace the original time series with the re-sampled alternatives, and that this should suffice to rerun the analysis with the original specifications of the remaining arguments.

Usage

1
spy()

Value

This function returns a list with two components, a paired list formals and an environment arg.env. formals contains all the arguments needed for a rerun of the targeted function. Note that formals will _only_ return the symbol, i.e. the name, when an argument is given to the function from an externally stored object. The environment arg.env contains all the actual values needed in order to rerun this function later on.


LAJordanger/leanRcoding documentation built on Feb. 27, 2020, 4:42 p.m.