
R programming for those coming from other languages - llambda
http://www.johndcook.com/R_language_for_programmers.html?
======
etrain
Heavy R user here. When I was starting out, this:
<http://cran.r-project.org/doc/contrib/Short-refcard.pdf> was a savior and
goes well with this piece.

As others have mentioned, getting into the useful data structures and
libraries is the next step here, because those are what makes R great. The
book "R in a Nutshell" is a nice desktop reference, and the CRAN Task Views
for your domain are a pretty helpful jumping off point:
<http://cran.r-project.org/web/views/>

The R mailing list and Stack Overflow communities are also a tremendous
resources.

~~~
disgruntledphd2
While I agree on the R mailing list and StackOverflow (subscribe for r on the
RSS feed) i would respectfully suggest that you ignore R in a Nutshell. While
it does have some interesting worked examples and some good explanation, the
book is essentially a commented version of the R introductory manuals.

The refcard is wonderful though. Personally, I found R bloggers really useful,
just reading through all the articles is a nice way to learn the packages and
tricks of the language (some of the code on the R help mailing list is also
extremely useful here).

In terms of short, concise, wonderful books Data Manipulation with R is a
favourite. Its only 150 pages, but it describes how to move your data from one
form to another in the best and easiest ways. The SQL stuff and the regular
expressions might already be known to the people here, but some of the
material on dates, times and general reshaping of data was extremely useful
(to me at least). R is not strong in this area, IMO and its nice to see some
guidance in this area, as R packages often have funky data shape requirements.

~~~
stcredzero
_While it does have some interesting worked examples_

This sounds good!

 _and some good explanation,_

Also sounds good.

 _the book is essentially a commented version of the R introductory manuals._

The question that comes to mind: exactly how good are the comments?

~~~
disgruntledphd2
They are reasonably good. Its definitely not a bad book, but its not one I
would recommend as almost all of the information it gives is in the manuals.
If you have programming experience, you're better off reading the manuals. I
didn't when I started learning R, but even then I felt somewhat cheated by the
reams and reams of man pages included with a text which I had paid for.

------
larrydag
While this looks like a good basic article for programmers learning R I
recommend moving onto The R Inferno: <http://www.burns-
stat.com/pages/Tutor/R_inferno.pdf> The R Inferno touches on do's and don't
within R programming. The burns-stat.com website is also a good reference for
R tutorials as well.

~~~
meepmorp
Thanks for that link. That's chock full of good tips for working in R, and
definitely addressed at least a couple things I spent a while debugging.

------
squidfood
> It is sometimes possible to use = for assignment, though I don't understand
> when this is and is not allowed.

Little bit of interesting history on this was just a google away:
[http://blog.revolutionanalytics.com/2008/12/use-equals-or-
ar...](http://blog.revolutionanalytics.com/2008/12/use-equals-or-arrow-for-
assignment.html)

~~~
cschmidt
I'm not sure that post is 100% correct. Reading it gave me a bad feeling that
it missed something I'd read in the past. See here for example ...

[http://stackoverflow.com/questions/1741820/assignment-
operat...](http://stackoverflow.com/questions/1741820/assignment-operators-in-
r-and)

The = operator is only a "top level" construct, while <\- can be used
anywhere. Now exactly what those limitations are may be a bit subtle (the OP's
point), so I also just use <-.

------
queensnake
R is so ugly. Octave / Matlab is supposed to have inconsistent syntax and
behavior but at least wrt matrices it seems much cleaner. So, is there a
language (like R or Matlab) that's beautiful and well thought out?
Mathematica?

------
phalina
There's a new book that seems to be about best practices for writing software
in R. It's called 'The Art of R Programming'. I got a review copy but I
haven't read it much yet, but the premise is that the book actually focuses on
R programming techniques as opposed to introducing statistics using R.

------
zvrba
Useless article: he didn't even bother to explain data frames, one of the most
used data structures in R.

