Description Usage Arguments Details Examples
Takes a sequence length and any two positive numbers in order to produce a fibonacci sequence. The fibonacci sequence is returned as a vector of numbers.
| 1 | fibonacci(seq_length = 10, first_num = 0, second_num = 1)
 | 
| seq_length | The length of the sequence as a number. The sequence length has to be greater than or equal to 2 ( | 
| first_num | The starting point of the sequence. Use any positive number that comes before second_num ( | 
| second_num | The next number in the sequence after first_num. Use any positive number that comes after first_num ( | 
If using the default first and second numbers of 0 and 1 R will return Inf starting at element number 1478.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run: 
fibonacci('eight', 2, -1)  # wrong #1
fibonacci(8, 2, -1)  # wrong #2
fibonacci(8, 2, 1)  # wrong #3
fibonacci(8, 2, 2) # wrong #4
## End(Not run)
fibonacci(8, 10, 12)  # correct!
fibonacci(seq_length = 20, first_num = 10, second_num = 15)  # yay!
fibonacci(30)
fibonacci()
fibonacci(1500)[1477]
fibonacci(1500)[1478]
fibonacci(1500)[1500]
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.