calcFib | R Documentation |
Compute Fibonacci numbers using four different methods:
1) iteratively using R code,
2) via the closed function in R code,
3) iteratively in C using the .C
function,
and 4) iteratively in C using the .Call
function.
calcFib(n, len=1, method="C")
n |
nth fibonacci number to calculate |
len |
a vector of length |
method |
select method to use: |
Vector of the last len
Fibonacci numbers
calculated.
Jon T. Schnute, Pacific Biological Station, Fisheries and Oceans Canada, Nanaimo BC
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.