search for: fibanacci

Displaying 1 result from an estimated 1 matches for "fibanacci".

2011 Apr 20
5
Fibonacci
Hi! I am trying to work out the code to get a Fibonacci sequence, using the while() loop and only one variable. And I can't figure it out. Fibonacci<-c(1,1) while (max(Fibonacci)<500){ Fibonacci<-c(Fibonacci, (max(Fibonacci) + ?(Fibanacci))) } How can I tell R to take the value one before the max value? (Without defining another variable) (Probably super easy... I am a beginner...) Thanks, Georgie [[alternative HTML version deleted]]