Home

The testy toad

The best way to get started with R is to simply play around with some code and get a feeling for some of the cool things you can do with it. The first time I got introduced to R, was through Conway’s game of life. This is simple population model which can create some pretty animations. I’m going to show you how to get one of these animations using R based on some code on the blog Are you cereal? that I’ve altered. This is what it should look like at the end:

conway

Installing R

You can install R here:

http://cran.r-project.org/bin/windows/base/ for windows

http://cran.r-project.org/bin/macosx/ for mac

Once installed, you will need to open R and create a new script and paste the code (at the bottom of page). Here’s how you create a new script:

Gnewscript

Now that you have your script, you can paste the code (below in blue)  in…

View original post 899 mots de plus

Publicités

Laisser un commentaire

Choisissez une méthode de connexion pour poster votre commentaire:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s