Recall {base} | R Documentation |
Recall
is used as a placeholder for the name of the function
in which it is called. It allows the definition of recursive
functions which still work after being renamed, see example below.
Recall(...)
... |
all the arguments to be passed. |
## A trivial (but inefficient!) example: fib <- function(n) if(n<=2) {if(n>=0) 1 else 0} else Recall(n-1) + Recall(n-2) fibonacci <- .Alias(fib) ## renaming wouldn't work without Recall fibonacci(10) # 55