Comments on: R Statistical Computing for Semi-Dummies?
http://ask.metafilter.com/234800/R-Statistical-Computing-for-SemiDummies/
Comments on Ask MetaFilter post R Statistical Computing for Semi-Dummies?Thu, 07 Feb 2013 09:54:33 -0800Thu, 07 Feb 2013 10:01:02 -0800en-ushttp://blogs.law.harvard.edu/tech/rss60Question: R Statistical Computing for Semi-Dummies?
http://ask.metafilter.com/234800/R-Statistical-Computing-for-SemiDummies
StatFilter: Would anybody be able to recommend a good introduction to the statistical computing language "R" that a reasonably quantitatively-adept psychologist might be able to work through on his own? Something like a step-by-step book or textbook with exercises would be great to help me become more fluent in R. (My colleagues at work who use R are primarily computer scientists who either first learned MatLab or are brilliant autodidacts when it comes to learning different scripting languages, and thus don't have any suggestions; Googling has mostly proferred a somewhat obscurely structured guide from the R authors and lots of invocations to just learn on my own, somehow...). I've become familiar with how to do many individually useful tasks in data structuring and analysis, but I feel a bit like a very high-functioning tourist who has learned a lot of phrases to get around but who would be lost and mugged in an alleyway if I strayed off the beaten path.post:ask.metafilter.com,2013:site.234800Thu, 07 Feb 2013 09:54:33 -0800KeterRcomputerscomputerlanguagesstatisticsautodidactscriptingresolvedBy: holgate
http://ask.metafilter.com/234800/R-Statistical-Computing-for-SemiDummies#3401522
<a href="http://cran.r-project.org/doc/contrib/Paradis-rdebuts_en.pdf">R For Beginners</a>?<br>
<br>
There's also <a href="https://science.nature.nps.gov/im/datamgmt/statistics/R/documents/R_for_SAS_SPSS_users.pdf">R for SPSS and SAS Users</a>, which may not apply to you, but has proved useful to people I know who primarily used SPSS but wanted some analysis that wasn't easy to do with it.comment:ask.metafilter.com,2013:site.234800-3401522Thu, 07 Feb 2013 10:01:02 -0800holgateBy: muhonnin
http://ask.metafilter.com/234800/R-Statistical-Computing-for-SemiDummies#3401529
<a href="http://www.r-bloggers.com/getting-started-with-r/">This blog post from today</a> has some good suggestions for both online and offline learning. If you are interested in brushing up on statistics at the same time as learning R, then I would say <a href="http://www.amazon.co.uk/Statistics-Introduction-Michael-J-Crawley/dp/0470022981/ref=sr_1_1?s=books&ie=UTF8&qid=1360259953&sr=1-1">Crawley's <em>Statistics: An Introduction using R</em></a> is very good. <br>
<br>
But if you're already very solid statistically, and just want help with R, then you could also do worse than use the site <a href="http://www.statmethods.net/index.html">Quick-R</a>. It's not exhaustive, but it covers 80% of the stuff you're likely to need in 20% of the space as other presentations.comment:ask.metafilter.com,2013:site.234800-3401529Thu, 07 Feb 2013 10:04:48 -0800muhonninBy: shothotbot
http://ask.metafilter.com/234800/R-Statistical-Computing-for-SemiDummies#3401543
Once you get the very basics, I really like<a href="http://www.amazon.com/exec/obidos/ASIN/0596809158/metafilter-20/ref=nosim/"> The R-Cookbook</a> which has section titles like "forming a confidence interval for a mean" or "reading from CSV files." <a href="http://www.cookbook-r.com/">Here</a> is handy website which also shows you how to do a bunch of basic tasks.comment:ask.metafilter.com,2013:site.234800-3401543Thu, 07 Feb 2013 10:14:36 -0800shothotbotBy: entropone
http://ask.metafilter.com/234800/R-Statistical-Computing-for-SemiDummies#3401570
Do you want to be able to <em>use</em> R, or be able to fully code in it?<br>
<br>
If you just want to be able to use it, you can download the add-on R-Cmdr (R Commander), which is a menu-driven interface.comment:ask.metafilter.com,2013:site.234800-3401570Thu, 07 Feb 2013 10:42:46 -0800entroponeBy: Nomyte
http://ask.metafilter.com/234800/R-Statistical-Computing-for-SemiDummies#3401591
I've seen people use R in several different ways. One way is to use "cookbook" approaches for reading, cleaning up, and organizing the data, followed by whatever analysis is desired. This is the cookbook approach.<br>
<br>
The second approach is to use R as an actual scripting/programming environment, which requires learning to identify and use basic control statements (loops, conditionals), variables and scope, writing functions, working with R objects (which are fairly rudimentary).<br>
<br>
For the second approach, I recommend <a href="http://www.amazon.com/exec/obidos/ASIN/1420068725/metafilter-20/ref=nosim/">Introduction to Scientific Programming and Simulation Using R</a>, which is just a basic book on R programming, with minimal coverage of statistics. (I am assuming you already know what kinds of statistical models you want to make.)<br>
<br>
One word of caution is that, being a very extendable language with lots of user-submitted code packages, R is somewhat inconsistent in its notation and naming conventions, and a little too lazy with throwing errors (e.g., if you use an index that's out of range for a numeric array, R will silently extend the array for you).comment:ask.metafilter.com,2013:site.234800-3401591Thu, 07 Feb 2013 11:00:46 -0800NomyteBy: zempf
http://ask.metafilter.com/234800/R-Statistical-Computing-for-SemiDummies#3401600
I know <a href="http://tryr.codeschool.com/">Try R</a> was floating around a while ago, though I haven't tried it. It seems to be something like a codecademy-style step-by-step walkthrough of the language.comment:ask.metafilter.com,2013:site.234800-3401600Thu, 07 Feb 2013 11:04:07 -0800zempfBy: bendybendy
http://ask.metafilter.com/234800/R-Statistical-Computing-for-SemiDummies#3401601
I quite liked this O'Reilly Code School introduction<br>
<br>
<a href="http://tryr.codeschool.com/">http://tryr.codeschool.com/</a><br>
<br>
...gets you through the practical concepts, mentions pirates frequently.comment:ask.metafilter.com,2013:site.234800-3401601Thu, 07 Feb 2013 11:04:51 -0800bendybendyBy: lucy.jakobs
http://ask.metafilter.com/234800/R-Statistical-Computing-for-SemiDummies#3401620
You're in psychology and this book is geared towards biology, but I found it helpful and it might be worth looking into: <a href="http://www.amazon.com/exec/obidos/ASIN/0199601623/metafilter-20/ref=nosim/">Getting Started with R</a>comment:ask.metafilter.com,2013:site.234800-3401620Thu, 07 Feb 2013 11:16:44 -0800lucy.jakobsBy: jacalata
http://ask.metafilter.com/234800/R-Statistical-Computing-for-SemiDummies#3401627
I was also going to mention the CodeSchool course.<br>
<br>
<a href="http://www.twotorials.com/">R TwoTutorials</a> is a set of two-minute videos on random 'how to do x in R' topics. Not sure if it is quite what you are looking for.<br>
<br>
I just took the <a href="https://class.coursera.org/compdata-002/class/index">Coursera Computing for Data Analysis</a> course, an intro to R. They may run it again in a few months, and it sounds like pretty much what you want. <br>
<br>
From there, a selection of books and links that I copied out of the wiki (because I think I'll lose access to it):<br>
<br>
Links to sites with tricks, tutorials and helpful articles, provided by various users on the discussion forum.<br>
<a href="http://wiki.stdout.org/rcookbook/">Cookbook for R</a><br>
<a href="http://www.statmethods.net/">Quick R</a><br>
<a href="http://www.r-statistics.com/2013/01/100-most-read-r-posts-for-2012-stats-from-r-bloggers-big-data-es/">100 most read R posts on R-statistics.com</a><br>
<a href="http://www.twotorials.com/">R Twotorials</a><br>
<a href="http://www.cyclismo.org/tutorial/R/">R Tutorial</a><br>
<a href="http://cran.r-project.org/doc/manuals/R-intro.html">An introduction to R</a><br>
<a href="http://pairach.com/2012/06/06/r-style-guide/">R style guide</a><br>
<a href="http://www.r-tutor.com">R tutor</a><br>
<a href="http://www.codeschool.com/courses/try-r">Try-R</a>. A free self-paced introductory R course from CodeSchool.com.<br>
<a href="http://flowingdata.com/2012/11/20/archive-of-datasets-bundled-with-r/">Archive for datasets bundled with R</a><br>
<a href="http://www.r-bloggers.com/">R-bloggers</a> R news and tutorials sourced from over 400 R bloggers.<br>
<a href="http://cran.r-project.org/web/packages/available_packages_by_name.html">CRAN Packages</a> List of R ve Network (CRAN).<br>
<a href="http://www.fernandohrosa.com.br/br/P/aprenda-a-usar-o-r/">Aprenda a usar o R</a> Tutorial in portuguese<br>
<a href="http://cran.r-project.org/doc/contrib/Short-refcard.pdf">R Quick Reference Card</a><br>
<br>
Books<br>
Provided by various users on the discussion forum and taken from the last slide in the 'Overview and history of R' lecture.<br>
Braun, W. John, and Duncan J. Murdoch. 2008. <a href="http://www.cambridge.org/gb/knowledge/isbn/item1163939/?site_locale=en_GB">A First Course in Statistical Programming with R</a>. 1st ed. Cambridge University Press.<br>
Burns, Patrick. 2011. <a href="http://www.burns-stat.com/pages/Tutor/R_inferno.pdf">The R Inferno</a>, this is a free PDF download.<br>
Chambers (2008). <a href="http://www.springer.com/statistics/computational+statistics/book/978-0-387-75935-7">Software for Data Analysis</a>, Springer. <br>
(your textbook) Chambers (1998). <a href="http://books.google.com.au/books/about/Programming_with_Data.html?id=Km1IBFZCRPUC&redir_esc=y">Programming with Data</a>, Springer.<br>
Conway & White. (2012). <a href="http://shop.oreilly.com/product/0636920018483.do">Machine Learning for Hackers</a>, O'Reilly<br>
Hastie & Tibshirani & Friedman (2011) <a href="http://www-stat.stanford.edu/~tibs/ElemStatLearn/">The Elements of Statistical Learning: Data Mining, Inference, and Prediction, 2nd edition</a>, Spring. The book can be downloaded for free from the supplied link, R code is also available.<br>
Kabacoff, Robert. 2011. <a href="http://www.manning.com/kabacoff/">R in Action. 1st ed</a>. Manning Publications. Publishers site has two free sample chapters and source code available as downloads - may have to register first.<br>
Matloff, Norman. 2011. <a href="http://books.google.com.au/books?id=4jL3sfmP1l8C&printsec=frontcover&dq=The+Art+of+R+Programming:+A+Tour+of+Statistical+Software+Design&hl=en&sa=X&ei=jcHqUJGTBsTKmgW-34CABQ&ved=0CDYQ6AEwAA">The Art of R Programming: A Tour of Statistical Software Design</a>. 1st ed. No Starch Press.<br>
Murrell (2005). <a href="http://www.stat.auckland.ac.nz/~paul/RGraphics/rgraphics.html">R Graphics</a>, Chapman & Hall/CRC Press. The book's web page has three free chapters (PDF) and the R source for all the diagrams used in the book.<br>
Pinheiro & Bates (2000). <a href="http://www.springer.com/statistics/statistical+theory+and+methods/book/978-1-4419-0317-4">Mixed-Effects Models in S and S-PLUS</a>, Springer. <br>
Sakar, Deepayan. <a href="http://www.springer.com/statistics/computational+statistics/book/978-0-387-75968-5">Lattice: Multivariate Data Visualization with R</a>, Springer. This <a href="http://lmdvr.r-forge.r-project.org/figures/figures.html">site</a> has all the figures and the code to generate them from the book.<br>
Venables & Ripley (2002). <a href="http://www.springer.com/statistics/computational+statistics/book/978-0-387-95457-8">Modern Applied Statistics with S</a>, Springer. <br>
Venables & Ripley (2000). <a href="http://books.google.com.au/books/about/S_Programming.html?id=-rKWRH0fglMC">S Programming</a>, Springer.<br>
Yau, Nathan (2011), <a href="http://au.wiley.com/WileyCDA/WileyTitle/productCd-0470944889.html">Visualize This: The FlowingData Guide to Design, Visualization, and Statistics</a>, Wiley. There is a <a href="http://flowingdata.com/">blog</a> associated with this book dedicated to data visualisation, it has some stunning graphs and data representation diagrams.<br>
Springer has a series of books called <a href="http://www.springer.com/series/6991">Use R!</a>.<br>
A longer list of books is at available at <a href="http://www.r-project.org/doc/bib/R-books.html">R-project.org</a>comment:ask.metafilter.com,2013:site.234800-3401627Thu, 07 Feb 2013 11:21:18 -0800jacalataBy: Smegoid
http://ask.metafilter.com/234800/R-Statistical-Computing-for-SemiDummies#3401711
I think these are all good suggestions, but for a psychologist there's no better book than Andy Field's <a href="http://www.amazon.com/exec/obidos/ASIN/1446200469/metafilter-20/ref=nosim/">Discovering Statistics using R</a>. It's an R version of his book on Discovering Stats using SPSS which was famous when I was in grad school in psychology (it's lighter on theory and heavier on how to actually do the stats with data).comment:ask.metafilter.com,2013:site.234800-3401711Thu, 07 Feb 2013 12:37:05 -0800SmegoidBy: mixing
http://ask.metafilter.com/234800/R-Statistical-Computing-for-SemiDummies#3401764
A few more suggestions / votes:<br>
<ul><br>
<li>The Braun & Murdoch book <i>A First Course in Statistical Programming with R</i> gives a really nice coverage of fundamentals, so it's definitely worth the read.</li><br>
<li>Venables & Ripley, <i>Modern Applied Statistics with S</i> is a classic. It's not a good one to start with, because it is very dense (e.g., it covers factor analysis in about 5 pages), but it's a great place to go looking for specific solutions.</li><br>
<li>Dalgaard's <a href="http://www.amazon.com/exec/obidos/ASIN/0387954759/metafilter-20/ref=nosim/">Introductory Statistics with R</a> is pretty good, I think.</li><br>
<li>The Fox & Weisberg book <a href="http://www.amazon.com/exec/obidos/ASIN/141297514X/metafilter-20/ref=nosim/">Companion to Applied Regression</a> is one of my favourites. It gives a very readable introduction to linear models in R, and is very strong on things like regression diagnostics.</li><br>
<li>If you're at all interested in psychometrics, William Revelle's forthcoming book <a href="http://www.personality-project.org/r/book/">An introduction to psychometric theory with applications in R</a> is good.</li><br>
<li>If you're interested in Bayesian methods, then John Kruschke's <a href="http://doingbayesiandataanalysis.blogspot.com.au/">Doing Bayesian Data Analysis</a> might be a good place to start, as it focuses heavily on R and WinBUGS.</li><br>
<li>I'm not personally a fan of the Andy Field books, but a lot of people really like them, and his <i>Discovering Statistics Using R</i> does have the advantage of being a book that starts with the basics and goes all the way up to mixed models.</li><br>
<li>As an alternative free resource that I'm a little ambivalent about, the course notes that I referred to in <a href="http://ask.metafilter.com/229721/How-do-I-negotiate-with-my-publisher">this</a> AskMe are available as a free PDF <a href="http://health.adelaide.edu.au/psychology/ccs/teaching/lsr/">here</a>. The coverage is probably a little basic for your purposes: it only goes as far as multiple regression and factorial ANOVA on the stats side, but it does cover introductory scripting and data manipulation. It has the advantages and disadvantages of being written for psych undergrads: it tries to start from an assumption of no background knowledge which can be useful, but it is tediously slow in places if you already know what you're doing. (btw: I wasn't sure if including this one violates self-linking prohibitions, but this <a href="http://metatalk.metafilter.com/17427/Selflinks-on-AskMe">MeTa</a> seems to suggest it's okay if the link is relevant and fully disclosed. If it's not, my apologies.)</li><br>
</ul>comment:ask.metafilter.com,2013:site.234800-3401764Thu, 07 Feb 2013 13:53:10 -0800mixingBy: Keter
http://ask.metafilter.com/234800/R-Statistical-Computing-for-SemiDummies#3401833
Wow! Thanks for the overwhelmingly rich responses, everyone! If I can't improve my knowledge of R now, I have noone to blame but myself. :)comment:ask.metafilter.com,2013:site.234800-3401833Thu, 07 Feb 2013 15:12:23 -0800KeterBy: dhruva
http://ask.metafilter.com/234800/R-Statistical-Computing-for-SemiDummies#3402634
I'm in the same boat, but with even less experience of R. I needed a thing that only R could do, so here I am. In the graphics dept, I discovered this site http://rweb.stat.ucla.edu/ggplot2/, which has a web demo of the graphics package ggplot2. You can play with data and get graphs and such, from a point and click interface, but it also spits out the code at another bottom panel, which I think is a great way to learn.comment:ask.metafilter.com,2013:site.234800-3402634Fri, 08 Feb 2013 10:54:04 -0800dhruvaBy: rapidadverbssuck
http://ask.metafilter.com/234800/R-Statistical-Computing-for-SemiDummies#3403594
The <a href="http://is-r.tumblr.com/">is.R()</a> blog is not strictly introductory, but it illustrates (with self-contained code) a wide variety of things you might want to do with R, especially with R graphics. You can just scroll through until you see something similar to what you'd like to do, and then apply the examples to your own data.comment:ask.metafilter.com,2013:site.234800-3403594Sat, 09 Feb 2013 10:42:53 -0800rapidadverbssuckBy: dhruva
http://ask.metafilter.com/234800/R-Statistical-Computing-for-SemiDummies#3466015
I don't know if you're still checking this thread, but here are a couple of point and click GUIs for R, especially ggplot2;<br>
1. <a href="http://www.deducer.org/pmwiki/index.php?n=Main.DeducerManual">Deducer</a>. This is awesome. You do your graph, and it spits out the code, so you can check it out.<br>
2. R Commander (Rcmdr) plugin called<a href="http://www.stats.bris.ac.uk/R/web/packages/RcmdrPlugin.KMggplot2/index.html"> RcmdrPlugin.KMggplot2</a>comment:ask.metafilter.com,2013:site.234800-3466015Thu, 11 Apr 2013 17:32:28 -0800dhruvaBy: knile
http://ask.metafilter.com/234800/R-Statistical-Computing-for-SemiDummies#3468378
<a href="http://talklab.psy.gla.ac.uk/R/">Introduction to R</a> by Dale Barrcomment:ask.metafilter.com,2013:site.234800-3468378Mon, 15 Apr 2013 04:28:16 -0800knile