tag:blogger.com,1999:blog-7666066816041190661.post8147326884550526737..comments2018-06-14T03:51:22.027-06:00Comments on Heuristic Andrew: Fibonacci sequence in R and SASAndrew Zhttp://www.blogger.com/profile/10108637160465346326noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-7666066816041190661.post-59563100520417609292014-12-11T08:57:52.560-07:002014-12-11T08:57:52.560-07:00Hi Rick, thank you for the comment. I included yo...Hi Rick, thank you for the comment. I included your links in the article to make them easier to click.Andrew Zhttps://www.blogger.com/profile/10108637160465346326noreply@blogger.comtag:blogger.com,1999:blog-7666066816041190661.post-269697493781171672014-12-11T08:13:25.992-07:002014-12-11T08:13:25.992-07:00You can also generate the Fibonacci sequence itera...You can also generate the Fibonacci sequence iteratively: <br />http://blogs.sas.com/content/iml/2010/09/30/twitter-and-the-fibonacci-sequence/<br />And, since the Fibonacci sequence is simply a linear relationship based on the two previous values, you can define the "Fibonacci matrix," which not only generates the sequence but also has interesting geometric properties: http://blogs.sas.com/content/iml/2010/10/05/matrices-eigenvalues-fibonacci-and-the-golden-ratio/<br />Rick Wicklinhttps://www.blogger.com/profile/13919716786757842151noreply@blogger.comtag:blogger.com,1999:blog-7666066816041190661.post-65706003505108452342014-12-06T09:22:05.991-07:002014-12-06T09:22:05.991-07:00Thank you, Andrew.Thank you, Andrew.Navneethhttps://www.blogger.com/profile/08605371412809015201noreply@blogger.comtag:blogger.com,1999:blog-7666066816041190661.post-29924671082132071072014-12-06T08:49:29.766-07:002014-12-06T08:49:29.766-07:00Navneeth: the lines that define actual and expecte...Navneeth: the lines that define actual and expected (copied below) are enclosed in parentheses to print the value of the assignment. Without the parentheses, the assignment would still happen, but nothing would be printed.<br /><br />(actual <- fib(1:10))<br />(expected <- c(1,1,2,3,5,8,13,21,34,55))'<br /><br />Try pasting the code yourself into r-fiddle.orgAndrew Zhttps://www.blogger.com/profile/10108637160465346326noreply@blogger.comtag:blogger.com,1999:blog-7666066816041190661.post-53978205960845737862014-12-06T07:40:43.999-07:002014-12-06T07:40:43.999-07:00What are the structures in the R unit test called ...What are the structures in the R unit test called (the ones in parentheses)? Or to put it in another way, why have you enclosed those expressions within parentheses?Navneethhttps://www.blogger.com/profile/08605371412809015201noreply@blogger.com