fibonacci: Generate a list of Fibonacci numbers

Description Usage Arguments Details Value Examples

Description

This function generates a list of Fibonacci numbers starting at 0 and ending with the Nth Fibonacci number.

Usage

1

Arguments

N

a positive integer or 0

Details

For this function 0 is regarded as the 0th Fibonacci number

Value

if N is a integer >= 0, the function returns a list of lenght N+1 starting a 0 and containing every Fibonacci number till the Nth else the function returns 'Error'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
fibonacci(0)
fibonacci(2)
fibonacci(160)

## Not run: 
fibonacci("a")
fibonacci(-6)
fibonacci(3.5)

## End(Not run)

planetMDX/Fibor documentation built on May 14, 2019, 2:56 p.m.