Best Book To Learn R Programming
Best Book To Learn R Programming
I'm learning to program in R. Any ideas as to the best book to use to learn the language? I'm currently working through "learn R In a Day" which is a nice introductory book, but obviously won't get me to a high level of proficiency. Many years ago I was pretty good at programming in Fortran (I think I used Fortran IV), I could also write assembly language programs for the 8088 chip. But it's been more than 25 years since I've done any programming, so I'm a "little" rusty. Any thoughts would be appreciated.
gatorman
gatorman
- market timer
- Posts: 6535
- Joined: Tue Aug 21, 2007 1:42 am
Re: Best Book To Learn R Programming
Have you looked at Coursera? Johns Hopkins offers a course in R, along with a data science specialization track that is based on R.
-
- Posts: 70
- Joined: Sun May 04, 2014 11:55 am
Re: Best Book To Learn R Programming
The Johns Hopkins courses in R offered on Coursera (free) are great.
Re: Best Book To Learn R Programming
Thanks for that suggestion! I didn't know that anything like that was even available.market timer wrote:Have you looked at Coursera? Johns Hopkins offers a course in R, along with a data science specialization track that is based on R.
gatorman
Re: Best Book To Learn R Programming
I like a Beginner's Guide to R by Zuur, but if you already have Learn R in a Day, this will likely be redundant. There are a few R courses on lynda.com that may help.
Since you already have a basic book on R, your next step might be a book that's more focused on a particular area of study that you wish to pursue. Zuur also has several books on mixed-effects modeling, for example.
Since you already have a basic book on R, your next step might be a book that's more focused on a particular area of study that you wish to pursue. Zuur also has several books on mixed-effects modeling, for example.
Re: Best Book To Learn R Programming
+1 very helpful in getting startedmarket timer wrote:Have you looked at Coursera? Johns Hopkins offers a course in R, along with a data science specialization track that is based on R.
Re: Best Book To Learn R Programming
+10market timer wrote:Have you looked at Coursera? Johns Hopkins offers a course in R, along with a data science specialization track that is based on R.
I am taking that class. It is very good...
KlangFool
30% VWENX | 16% VFWAX/VTIAX | 14.5% VTSAX | 19.5% VBTLX | 10% VSIAX/VTMSX/VSMAX | 10% VSIGX| 30% Wellington 50% 3-funds 20% Mini-Larry
-
- Posts: 102
- Joined: Tue May 13, 2014 1:27 pm
Re: Best Book To Learn R Programming
Just for curiosity, why are you interested in R? It's mainly for statisticians isn't it? I like it since it's free. I personally find Matlab (or the free version Octave) much easier and more powerful for the analyses (stochastic algorithms and system analysis) that I need to do.
-
- Posts: 553
- Joined: Tue Feb 15, 2011 7:35 pm
Re: Best Book To Learn R Programming
I have used R in the past. Honestly, my impression is that it's too complicated, with too many special cases and implicit conventions (eg apply, lapply, sapply).
If I were in your shoes, I would look at Python and the 'pandas' package before diving fully into R. It provides much of the power of R, but in a more mainstream language.
If I were in your shoes, I would look at Python and the 'pandas' package before diving fully into R. It provides much of the power of R, but in a more mainstream language.
Re: Best Book To Learn R Programming
We don't know anything yet about gatorman's shoes and reasons for learning R. I am planning to learn it, too, and for me it's important that R is an open-source, widely-used language. A simpler package could be easier to learn but more difficult to maintain.dailybagel wrote:I have used R in the past. Honestly, my impression is that it's too complicated, with too many special cases and implicit conventions (eg apply, lapply, sapply).
If I were in your shoes, I would look at Python and the 'pandas' package before diving fully into R. It provides much of the power of R, but in a more mainstream language.
Victoria
Inventor of the Bogleheads Secret Handshake |
Winner of the 2015 Boglehead Contest. |
Every joke has a bit of a joke. ... The rest is the truth. (Marat F)
- stevewolfe
- Posts: 1676
- Joined: Fri Oct 10, 2008 7:07 pm
Re: Best Book To Learn R Programming
I've taken this class (completed 100% with distinction), it's very good and called "Computing for Data Analysis". The assignments are realistic and quite interesting. Highly recommended and now part of a certification track for data scientist!target2030 wrote:The Johns Hopkins courses in R offered on Coursera (free) are great.
Re: Best Book To Learn R Programming
Python is open-source and very widely used, much more widely used than R. It's also a general purpose language, with many widely available libraries for specialized uses.VictoriaF wrote:We don't know anything yet about gatorman's shoes and reasons for learning R. I am planning to learn it, too, and for me it's important that R is an open-source, widely-used language. A simpler package could be easier to learn but more difficult to maintain.dailybagel wrote:I have used R in the past. Honestly, my impression is that it's too complicated, with too many special cases and implicit conventions (eg apply, lapply, sapply).
If I were in your shoes, I would look at Python and the 'pandas' package before diving fully into R. It provides much of the power of R, but in a more mainstream language.
Victoria
Whether R is better for your and gatorman's purposes is another question.
Re: Best Book To Learn R Programming
I agree with you about Python itself. But dailybagel proposed a package of Python and Panda as a replacement for R, and I don't know how it is used in comparison with R. I admit ignorance in this matter and look forward to dailybagel's clarification.richard wrote:Python is open-source and very widely used, much more widely used than R. It's also a general purpose language, with many widely available libraries for specialized uses.VictoriaF wrote:We don't know anything yet about gatorman's shoes and reasons for learning R. I am planning to learn it, too, and for me it's important that R is an open-source, widely-used language. A simpler package could be easier to learn but more difficult to maintain.dailybagel wrote:I have used R in the past. Honestly, my impression is that it's too complicated, with too many special cases and implicit conventions (eg apply, lapply, sapply).
If I were in your shoes, I would look at Python and the 'pandas' package before diving fully into R. It provides much of the power of R, but in a more mainstream language.
Victoria
Whether R is better for your and gatorman's purposes is another question.
Victoria
Inventor of the Bogleheads Secret Handshake |
Winner of the 2015 Boglehead Contest. |
Every joke has a bit of a joke. ... The rest is the truth. (Marat F)
Re: Best Book To Learn R Programming
I don't know either. It might be worth browsing:VictoriaF wrote:<>I agree with you about Python itself. But dailybagel proposed a package of Python and Panda as a replacement for R, and I don't know how it is used in comparison with R. I admit ignorance in this matter and look forward to dailybagel's clarification.
Victoria
http://pandas.pydata.org/ The description includes that it enables "you to carry out your entire data analysis workflow in Python without having to switch to a more domain specific language like R."
https://www.google.com/search?q=python+pandas
Re: Best Book To Learn R Programming
R, like S on which is based, is a scripting language for statistical analysis. The idea is that the language contains a library of statistical analyses and that you use R to combine them together to do custom analyses. R is like the SAS JMP scripting language.
Part of learning R is learning statistical analysis. If you don't understand, say, eigenvector analysis, then R may be difficult to learn. Maybe what the OP needs first is a good book on multivariate analysis.
R occupies a kind of middle ground. If you can't do the kind of factor analysis you want in an Excel plug-in, the next level is use a statistical package, which doesn't require any programming. If you have lots of complicated logic for cleaning up the data, estimating missing values, etc. or you want to use your own custom version of factor analysis, then R would be a good choice.
If what you want to do is get some data out of comma separated text files, put it in a relational database, statistically analyze it, and then display it in an interactive graphical display on a web page, then most of your code won't be statistical analysis and you really need a general purpose programming language, such as Java or python.
If what you want to do is learn programming, then I agree with all of the other posters who suggest more mainstream programming languages. Their syntax tends be more regular and there are a lot more books and videos out about them. There are also core computer science concepts which are programming language independent; if you understand how a depth first tree walk algorithm works, then you shouldn't have any problem understanding the python or Java or Fortran versions.
Part of learning R is learning statistical analysis. If you don't understand, say, eigenvector analysis, then R may be difficult to learn. Maybe what the OP needs first is a good book on multivariate analysis.
R occupies a kind of middle ground. If you can't do the kind of factor analysis you want in an Excel plug-in, the next level is use a statistical package, which doesn't require any programming. If you have lots of complicated logic for cleaning up the data, estimating missing values, etc. or you want to use your own custom version of factor analysis, then R would be a good choice.
If what you want to do is get some data out of comma separated text files, put it in a relational database, statistically analyze it, and then display it in an interactive graphical display on a web page, then most of your code won't be statistical analysis and you really need a general purpose programming language, such as Java or python.
If what you want to do is learn programming, then I agree with all of the other posters who suggest more mainstream programming languages. Their syntax tends be more regular and there are a lot more books and videos out about them. There are also core computer science concepts which are programming language independent; if you understand how a depth first tree walk algorithm works, then you shouldn't have any problem understanding the python or Java or Fortran versions.
- 3CT_Paddler
- Posts: 3485
- Joined: Wed Feb 04, 2009 4:28 pm
- Location: Marietta, GA
Re: Best Book To Learn R Programming
I like the Python approach using Pandas, but R may be more useful if there are existing R libraries (of which there are thousands) that the OP wants to use. Getting Pandas and all of its dependencies properly installed has become progressively more difficult/tedious with each new version.
Re: Best Book To Learn R Programming
Thanks for all the replies. R is the language I want to learn at this time, and I have good reasons which I don't want to go into on this forum. I appreciate the discussion of other languages, and I may pick some of them up down the road, but my current emphasis is on learning R.
Victoria (and anyone else interested in R), I've identified a lot of resources for learning R. If you would like some links, I can probably save you a good bit of time. PM me if you are interested.
I've worked through a good bit of the Learn R in a Day book and find it helpful. It is available as a download on the Kindle at a nominal cost. I'd recommend it.
Thanks again,
gatorman
Victoria (and anyone else interested in R), I've identified a lot of resources for learning R. If you would like some links, I can probably save you a good bit of time. PM me if you are interested.
I've worked through a good bit of the Learn R in a Day book and find it helpful. It is available as a download on the Kindle at a nominal cost. I'd recommend it.
Thanks again,
gatorman
Re: Best Book To Learn R Programming
"The R Inferno" gives some good insights into R traps and pitfalls. http://www.burns-stat.com/documents/boo ... r-inferno/
Re: Best Book To Learn R Programming
Thanks! Great book, I read the first couple chapters and saved a copy to read the rest later.jstat wrote:"The R Inferno" gives some good insights into R traps and pitfalls. http://www.burns-stat.com/documents/boo ... r-inferno/
gatorman
-
- Posts: 1177
- Joined: Wed May 09, 2012 10:21 pm
Re: Best Book To Learn R Programming
I've learned a lot from the old _The New S Language_ book, and from _Introduction to Scientific Programming and Simulation Using R_ by Owen, Maillardet and Robinson. Matloff's _The Art of R Programming: A Tour of Statistical Software Design_ is very well regarded.
If you remember a bit of Lisp or APL, you' ll find it familiar. Loops a la Fortran can become very inefficient in R -- -vector processing is preferred. It is possible to run Fortran code within R -- _The New S Language_ has a section on it. It is easy if you have a Linux-like system.
Every area has their own packages, please check http://cran.r-project.org/web/views/ for what interests you. But since there are new libraries all the time, even the previous page cannot cover the very cutting edge. Some Linux distributions like Debian may not have the very latest R-base and packages available.
If you remember a bit of Lisp or APL, you' ll find it familiar. Loops a la Fortran can become very inefficient in R -- -vector processing is preferred. It is possible to run Fortran code within R -- _The New S Language_ has a section on it. It is easy if you have a Linux-like system.
Every area has their own packages, please check http://cran.r-project.org/web/views/ for what interests you. But since there are new libraries all the time, even the previous page cannot cover the very cutting edge. Some Linux distributions like Debian may not have the very latest R-base and packages available.
- 3CT_Paddler
- Posts: 3485
- Joined: Wed Feb 04, 2009 4:28 pm
- Location: Marietta, GA
Re: Best Book To Learn R Programming
You could also take a look at The Art of R Programming... I am not an R user, but it pops up on my recommended book reading list on Amazon all the time and has very good reviews.
Re: Best Book To Learn R Programming
Emotionless, prognostication free investing. Ignoring the noise and economists since 1979. Getting rich off of "smart people's" behavioral mistakes.
Re: Best Book To Learn R Programming
Portfolio Analysis in R
http://www.capitalspectator.com/portfol ... portfolio/
http://www.capitalspectator.com/portfol ... portfolio/
Re: Best Book To Learn R Programming
Great post! Thank you!richard wrote:Portfolio Analysis in R
http://www.capitalspectator.com/portfol ... portfolio/
gatorman
Re: Best Book To Learn R Programming
Reading that post is inspiring me to start watching the coursera videos. The libraries available for R look interesting.
I'd still recommend learning python first, absent a special reason, for most people.
I'd still recommend learning python first, absent a special reason, for most people.
Re: Best Book To Learn R Programming
I'd recommend the Learn R in a Day as a quick way to get into it. There's also another book, R in a Nutshell that's available as a free pdf download. I'm reading it now and think it is pretty good. Finally, the recommended course book for the Coursera course (500 pgs +/-) is also available as a free download if you look around a little. Here are some other links I found to be helpful:richard wrote:Reading that post is inspiring me to start watching the coursera videos. The libraries available for R look interesting.
I'd still recommend learning python first, absent a special reason, for most people.
http://cran.r-project.org/doc/manuals/r ... intro.html
http://www.bioconductor.org/
http://cran.r-project.org/web/packages/ ... _name.html
http://cran.r-project.org/doc/contrib/Short-refcard.pdf
http://www.e-reading.link/bookreader.ph ... with_R.pdf
http://www.statmethods.net/
https://r-forge.r-project.org/
http://www.omegahat.org/
Hope that helps. R is not hard to understand, but there doesn't seem to be any consistency in naming conventions, and the documentation I've reviewed isn't that great, which slows down the learning process some. All that said, still very doable.
I think I will take the Coursera courses as well.
gatorman
Re: Best Book To Learn R Programming
I have this one and its a bit brief. I also own R for Everyone, I would recommend it much more highly. FWIW, I'm a student in a data science program so I've been learning R quite extensively, so I have used both books a lot.3CT_Paddler wrote:You could also take a look at The Art of R Programming... I am not an R user, but it pops up on my recommended book reading list on Amazon all the time and has very good reviews.
I have The Art of R Programming on my Kindle and I think I got it on super sale (probably less than $5) during a back to school sale. I would regret the purchase if had cost more.
Re: Best Book To Learn R Programming
I agree about the Coursera courses ... very enjoyable, not terrible difficult, yet enough of a challenge to be satisfying.
I am currently working through "R in Action" which has been valuable, but may not be the best to introduce you to R.
Another couple interesting websites:
http://rseek.org/
http://simplystatistics.org/
http://www.r-bloggers.com/
I am currently working through "R in Action" which has been valuable, but may not be the best to introduce you to R.
Another couple interesting websites:
http://rseek.org/
http://simplystatistics.org/
http://www.r-bloggers.com/
Re: Best Book To Learn R Programming
More info on the quantmod package here:richard wrote:Portfolio Analysis in R
http://www.capitalspectator.com/portfol ... portfolio/
http://www.quantmod.com/examples/intro/
but the documentation on CRAN is a lot better.
I also found this to be helpful:
http://statmath.wu.ac.at/~hornik/QFS1/q ... gnette.pdf
gatorman
Re: Best Book To Learn R Programming
Thanks for posting the links Gatorman. Back in the day, I learnt R with Robert Gentleman and Ross Ihaka as part of my degree. They were the original developers of R. Brings back a lot of memories, perhaps I'll have to dig into the books you posted
Re: Best Book To Learn R Programming
You are certainly welcome. It must have been pretty cool to have learned a language from the original developers.James2 wrote:Thanks for posting the links Gatorman. Back in the day, I learnt R with Robert Gentleman and Ross Ihaka as part of my degree. They were the original developers of R. Brings back a lot of memories, perhaps I'll have to dig into the books you posted
gatorman
Re: Best Book To Learn R Programming
Here is a link to a pdf on Monte Carlo methods in R:
http://www.stat.ufl.edu/archived/casell ... C-UseR.pdf
gatorman
http://www.stat.ufl.edu/archived/casell ... C-UseR.pdf
gatorman
Last edited by gatorman on Tue Jan 27, 2015 10:26 am, edited 1 time in total.
Re: Best Book To Learn R Programming
This is probably the last link I'll post on this thread. I thought this tutorial on working with time series data was too good to pass up:
http://faculty.washington.edu/ezivot/ec ... in%20R.pdf
gatorman
http://faculty.washington.edu/ezivot/ec ... in%20R.pdf
gatorman