📜  递归函数 r - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:49.047000             🧑  作者: Mango

代码示例2
# Recursive function to find factorial
recursive.factorial <- function(x) {
if (x == 0)    return (1)
else           return (x * recursive.factorial(x-1))
}