Best cheap or free resources for learning R?
May 27, 2016 10:05 AM   Subscribe

I'm looking for some help cutting through the mix of crap that Google throws up and finding some quality free (or very inexpensive) resources for learning the statistical programming language R.

I have some very basic, very rusty R skills that I'm trying to use to help my company get a better handle on its finances. Unfortunately, I find that I run into my limits really quickly and I'm having a hard time growing past them. If I know what question to ask I can often find an answer on Stack Exchange or the like, but I think what I really need are some good tutorials.

I'm in a weird spot where the introductory stuff feels too remedial, but the intermediate stuff leaves me a bit confused. I think I'm just having trouble finding a set of tutorials that really work for me and that I can stick with. I'm not looking for a simultaneous education in statistics here, just for a nuts-and-bolts education in the language itself.

Here's an example of the kind of problem I'm grappling with now. I'm not trying to get a solution here, I just want to give people an idea of where I'm at. I have this dataset of all of the cost codes for all our projects over the last couple of years, which I've got arranged in a csv file with information about the estimated cost, actual cost, cost category, what job the cost belonged to, etc. I'd like to be able to break stuff out by job and get R to give me a sum of the total estimated cost and total actual cost for each of the jobs in the dataset, and then put those sums into a new data frame with each total, the associated job, and the start date for that job. Then I'd like to be able to plot those costs over time and compare them to actual costs, so that we can see how our slippage has been improving or worsening over time. I feel like I need to know more about loops and conditional indexing and things like that, but I'm not sure what search terms to use or questions to ask and I'm a bit stymied.

Again, that's just an example. What I know I really need to do is to put in some time generally improving my R skillset, so that I can approach these kinds of problems from the standpoint of already knowing 95% of what I need to know and just having to fill in the remaining 5% gaps by googling around, consulting R's comprehensive-if-sometimes-cryptic built-in help system, and maybe asking a specific question on a Q&A forum. I already know how to do some of things I need to do for the example above, but I'm too many steps away for a quick google to give me what I need.

My company is fine with me putting in time on this on the clock (as long as my other duties are getting taken care of) but I don't have the sense that they're willing to invest much money into my education here, and at any rate I feel like the stuff I need to learn is so basic that I should be able to find the knowledge for free or at least for cheap. I'd be willing to buy a book to study with or enroll in a course or something, but I'd be going out of my own pocket here and it's not like I'm making big bucks, so I've got maybe $25 max to invest at the moment. I'm not interested in subscription-based services. If I can find a quality free tutorial, so much the better. Some of the ones I've found so far (such as this one) start out fine, but by the time we're getting to stuff I don't already know they're making a sharp turn into statistical analysis which is not what I need. I don't need to learn how to do a proper principal component analysis in R, I just want to get better at the mechanics of the language itself.

So, what can y'all do for me there? Do you know of something that you think would be suitable? Let me know if I'm not providing enough information to let you give a good answer—I feel like I'm kinda in the weeds here and that part of my problem is that I don't know what questions to ask, so I won't be surprised if I've left out something important.
posted by Anticipation Of A New Lover's Arrival, The to Computers & Internet (8 answers total) 28 users marked this as a favorite
 
I've found the R Cookbook fairly helpful.

For your specific example, you want to use the ddply function in the plyr package; R cookbook tutorial for that specifically here.
posted by damayanti at 10:09 AM on May 27, 2016 [2 favorites]


I'm just new to R myself so not sure if this is any use. I'm slowly working through the Data Science specialization on Coursera. It's from John Hopkins. It's 9 different courses and it sounds like couple of them might cover what you're looking for.

It does cost money but it's fairly reasonable for what you get. $64 a course.

Workload per week is pretty low and new sessions start pretty much every week. You can also easily reassign to another session if something comes up. Right now I paid for one, did a week and due to a couple of unforseen time suckers I've just t it off to a future session with no work lost so it's very flexible.
posted by Jalliah at 10:48 AM on May 27, 2016


http://rseek.org/

Well as a programmer I'd go more directly to the documentation and run small tests. I'd use very small csv files, and make small programs that run instantly with data I totally understand.

stackoverflow seems to have good posts for R but the searching is really hard due to the single letter name.

And not to be negative but the direction of your questions is more along the lines of a business ERP package, due to the very academic skew of R there may not be a lot of examples of exactly where you're going. Perhaps searching "rlang for business" or erp may get some blog posts? Not that R is not fully capable of what you want to do and probably more accurate once you get a model going but different tools. I got some results for "erp business" on the rseek engine.
posted by sammyo at 10:52 AM on May 27, 2016


I too am new to R. I'm currently taking a class that is focused on data mining and machine learning, and found these to be very helpful (there are four different "getting started" tutorials):

https://www.kaggle.com/c/titanic/details/new-getting-started-with-r

The context is a machine-learning contest, but they cover the basics pretty well.
posted by Gorgik at 11:44 AM on May 27, 2016 [1 favorite]


the reddit forum looks useful and open to questions: https://www.reddit.com/r/rlanguage
posted by sammyo at 1:33 PM on May 27, 2016


Two links that may be useful:
https://www.datacamp.com/courses/r-for-the-intimidated
When you want to go a little deeper:
http://adv-r.had.co.nz/
Also learn to love Google and stack overflow. Odds are good your question has been asked and answered many times!
posted by chrisamiller at 6:54 PM on May 27, 2016


Best answer: Swirl is a dedicated R package that teaches both data analysis and R itself. It's aimed mainly at beginners, with some intermediate content.

I like it for a few reasons:

- it's a package, not a separate book or video course. That means you're integrated into the console at all times, and everything you do to progress gets you more familiar with the interface. I find it user-friendly, but your mileage may vary.

- it's divided into distinct courses, which are then divided into simple lessons. Each lesson takes about 5 - 20 minutes, and you can skip between lessons all you like, which makes it handy to find the topic or level which suits you best. For example, there's "Getting and Cleaning Data", which covers dply, tidyr, and lubridate and might be useful for your specific case.

- Because literally everything gets printed to the console, you can save your lesson progress as text, and look back over it easily when you need a refresher.

- It's honestly fun to use, with little confusion or frustration over what you're actually supposed to be doing at any stage. You'll want more advanced books or resources as you progress, but as a place to start it's not bad at all.

The package website is here, and the list of courses is on a separate GitHub page. The installation instructions are pretty clear -- I would just install all the course libraries they have listed at once.
posted by rollick at 4:50 AM on May 30, 2016 [3 favorites]


Response by poster: I'm loving Swirl. Having the tutorial be built into R makes it just so much more usable for me. It's also somewhat interactive, so if I screw something up it'll try to give me some feedback about what I might be doing wrong. It's not terribly sophisticated in that regard, but it's helped me out more than once already.

And it covers so much! I love how it's broken into a zillion little manageable chunks, and how there's a chunk for almost everything. I'm really digging it and have been working my way through it in my downtime. Good stuff.
posted by Anticipation Of A New Lover's Arrival, The at 12:23 PM on June 22, 2016


« Older I liked your study, let's hang out?   |   How do I handle seeing gross and unsanitary... Newer »
This thread is closed to new comments.