Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Common R idioms [closed]

Tags:

r

What good resources are there for R idioms, in the same line as there are for Java and Python?

like image 348
pufferfish Avatar asked Mar 10 '10 10:03

pufferfish


3 Answers

I would primarily recommend the R Inferno. In particular, study section 3 on vectorization, which is probably the key concept in R programming.

Beyond that, I would second Dirk's recommendation of John Chambers book.

Going a step farther: the R language is derived primarily from Scheme. One of the best ways to deeply understand R programming (as compared to a language like Java or C) is by learning about functional programming. For this, the best resource might be SICP (the "Structure and Interpretation of Computer Programs", available free online) which uses Scheme. You can find the relevant video lectures online as well: MIT 6.001 and Berkeley 61a.

like image 138
Shane Avatar answered Sep 30 '22 09:09

Shane


Easy: 2200+ packages and counting on CRAN :)

Actually, jokes aside, the best description I have read was in Chambers (2008).

like image 20
Dirk Eddelbuettel Avatar answered Sep 30 '22 09:09

Dirk Eddelbuettel


There is Rosetta Code which presents many common programming tasks in different programming languages. Then there is a blog post by Stephen Turner that lists several ressources for programmers coming from other languages, for instance you can find slides from Drew Conway who compares Python with R.

like image 43
Karsten W. Avatar answered Sep 30 '22 09:09

Karsten W.