You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default should be on = "exit" for backward compatible reasons.
Motivation
This would open up for various types of profiling, e.g. time and memory consumption for different type of tasks. It would also allow to pre-inspect calls before they are made, e.g. assisting users and help them avoid common mistakes.
Discussion
It could be discussed whether the on = "enter" callback function should be able to modify the expression expr before the task is evaluated. I can imagine this could become a feature request in the future.
Background
We can use
addTaskCallback()
to register "an R function that is to be called each time a top-level task is completed". For example, with:we get:
Wish
Make it possible to register a function that is called before the expression is evaluated, e.g.
which, with the previously registered callback, would give:
The default should be
on = "exit"
for backward compatible reasons.Motivation
This would open up for various types of profiling, e.g. time and memory consumption for different type of tasks. It would also allow to pre-inspect calls before they are made, e.g. assisting users and help them avoid common mistakes.
Discussion
It could be discussed whether the
on = "enter"
callback function should be able to modify the expressionexpr
before the task is evaluated. I can imagine this could become a feature request in the future.See also
The text was updated successfully, but these errors were encountered: