Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

calcFib

Calculate Fibonacci Numbers by Several Methods


Description

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.

Usage

calcFib(n, len=1, method="C")

Arguments

n

nth fibonacci number to calculate

len

a vector of length len showing previous fibonacci numbers

method

select method to use: C, Call, R, closed

Value

Vector of the last len Fibonacci numbers calculated.

Author(s)

Jon T. Schnute, Pacific Biological Station, Fisheries and Oceans Canada, Nanaimo BC


PBSmodelling

GUI Tools Made Easy: Interact with Models and Explore Data

v2.68.8
GPL (>= 2)
Authors
Jon T. Schnute [aut], Alex Couture-Beil [aut], Rowan Haigh [aut, cre], Nicholas Boers [ctb], Anisa Egeli [ctb], A. R. Kronlund [ctb], Steve Martell [ctb], Norm Olsen [ctb]
Initial release
2019-03-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.