fiboR <- function(N) { if (N==0) { fibotmp <- 0 } else if (N==1) { fibotmp <- 1 } else { fibotmp = fiboR(N-1) + fiboR(N-2) } return(fibotmp) }