Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to learn R as a programming language [closed]

Tags:

r

I'd like to know how to learn the R language as as 'programming' language as opposed to learning it as a statistical system. My question is prompted by lack of understanding of such functions as parse, eval, etc. which may not find frequent use by an R user with a 'statistics' persuasion.

Edit: I've been exploring such tools like Rpy RSPerl rJava and wish to (at the very least) be able to understand concepts that facilitate R's communication with other programming languages.

The availability of Web applications for R (R-PHP, RApache, etc.) is another motivationg factor for me to gain a deeper, more structural understanding of R.

Last but not the least, I'd like to be able to write R packages for which such understanding would be beneficial if not necessary.

like image 375
harshsinghal Avatar asked Nov 16 '09 21:11

harshsinghal


People also ask

Can I learn R without any programming experience?

R is a great language for programming beginners to learn, and you don't need any prior experience with code to pick it up. Nowadays, R is easier to learn than ever thanks to the tidyverse collection of packages.

Is R tough to learn?

R is known for being hard to learn. This is in large part because R is so different to many programming languages. The syntax of R, unlike languages like Python, is very difficult to read.


3 Answers

For starters, you might want to look at this article by John Cook. Also make sure that you read "The R Inferno".

There are many good resources on the R homepage, but in particular, read "An Introduction to R" and "The R Language Definition".

Some very closely related stackoverflow questions:

  • books-for-learning-the-r-language.
  • what-are-some-good-books-web-resources-and-projects-for-learning-r
  • suggestions-on-way-resources-to-start-learning-statistical-language-r

My favorite book on the subject: "Software for Data Analysis: Programming with R", by John Chambers, the creator of the S language.

like image 117
Shane Avatar answered Oct 16 '22 21:10

Shane


A good book for learning R-as-a-programming-language (as opposed to R-for-statistics) is The Art of R Programming, by Norman Matloff.

enter image description here

It's very readable, doesn't assume you're a computer scientist, and is quite inexpensive as R books go.

like image 23
gung - Reinstate Monica Avatar answered Oct 16 '22 19:10

gung - Reinstate Monica


I would rather suggest a good and comprehensive start, like The R Book by Michael Crawley. It's an easy-to-read and complete book on R core functions, with statistical tips and a few exercises. It focuses a lot on R strengths (e.g. linear models) and gives also useful coding tricks. It helped me a lot while I was struggling on cryptic online courses.

alt text

like image 18
Federico Giorgi Avatar answered Oct 16 '22 21:10

Federico Giorgi