This should be easy, but cannot find direct answers on google or SO.
Imagine that in R I run a function FOuter(), and inside its body it executes some loop and calls another function FInner(). Is there an easy way to count / record the number of calls FInner? I am trying to estimate how much time I can save if I optimize FInner.
source
share