Paolo at One R Tip a Day points out a nifty new site: Rosetta Code. One of the best ways to learn a new language is to compare how problems are solved in the new language with one you know, and this site is tailor-made for that purpose. For hundreds of textbook computer-science problems, you can see the code that solves in in dozens of languages. (Rosetta Code is a great name.) R already has code for dozens of problems, including such classic hits as:
- Bubble Sort,
- Fibonacci sequence (I can think of a one-line solution, but I guess that defeats the point),
- Towers of Hanoi, and
- The 99 Bottles of Beer song
It's all wiki-based, so you can submit your own problems and solutions, too!
One R Tip a Day: Rosetta Code
Comments