The simplest use is that the user will place set_collector() in .onLoad(), pkg is guessed from the .onLoad call, or from DESCRIPTION if called outside. by default we consider all exported functions but we can provide a custom list.
These will replace the body of relevant functions with collect_and_run(), with similar magic to what we had before, with the most notable changes:
we record a call only if its called out of its own namespace (we don't clutter with internal calls)
cc @krlmlr
It has 2 exported functions:
set_collector(funs = NULL, pkg = NULL, path = "collector")
collect_and_run()
The simplest use is that the user will place
set_collector()
in.onLoad()
, pkg is guessed from the .onLoad call, or from DESCRIPTION if called outside. by default we consider all exported functions but we can provide a custom list.These will replace the body of relevant functions with
collect_and_run()
, with similar magic to what we had before, with the most notable changes: