A more complex recursive function: the so-called Ackermann function (see here).
To define it we use the Recall command.
Let us first see a use to define the factorial (which can be more easily defined by an iteration):

fact <- function(n) if (n==0) 1 else Recall(n-1)*n
fact(0); fact(1); fact(10); fact(170)
# [1] 1
# [1] 1
# [1] 3628800
# [1] 7.257416e+306

Here is the function of Ackermann:

Ack = function(m,n) {if(m==0) n+1 else{if(n==0) Recall(m-1,1) else Recall(m-1,Recall(m,n-1))}}

I can only calculate values for a few inputs. Examples:

Ack(1,2)
# [1] 4
Ack(3,4)
# [1] 125
Ack(3,5)
# [1] 253
Ack(4,0)
# [1] 13

For example, Ack(4.2) is 2^65536 - 3: a huge number!