Do you need to learn RStudio?
I work in Research and Evaluation, with lots of data. But I don’t use RStudio.
I find real joy in research and evaluation by hearing different perspectives, digging into WHY things happen, finding out things I didn’t know, having conversations with people about those things I didn’t know… the storytelling and exploring ideas with people.
Don’t get me wrong, I love a good Excel spreadsheet and a swanky graph.
When I need to do some statistical analysis that is more complicated than the basics, I turn to SPSS (thank you stats module from my Psychology degree at University of Lincoln). But I don’t necessarily get my kicks from spending days and weeks playing with thousands of lines of data.
I’m fortunate to know lots of people who do love that bit though. And I think there is a good chunk of researchers, evaluators, and data wonks, who go into this area of work for that reason.
And when I meet those who do specialise in the big quant stuff, they tend to use RStudio. Those who are expert in it, swear by it. They don’t just use it, they LOVE it. They can’t live without it.
So, for a while, I’ve been battling with one key question: Do I need to learn to use RStudio?
What is RStudio?
Before I get to that though, you might have heard of RStudio, but don’t know what it is. And also, what is R?
Well, firstly, R is the programme language and ‘engine’. The thing I’m writing about here though is “RStudio”, which is the main programme that you’ll have heard about. That’s different to R.
RStudio (in simple terms) is an ‘environment’ for writing and running code, built from the ground up for statistical analysis.
The distinction is important. That might sound complicated, so let’s simplify it.
Excel is like your air fryer. R is kind of like your gas stove, and RStudio would be a full kitchen with that stove in the middle, and complete with pots, pans, utensils, knives, and recipe books.
No shade on my air fryer. I’m a big air fryer convert and use mine all the time. The learning curve is simple, and I can select ‘roast’, ‘reheat’, ‘air fry’, or ‘max crisp’. Homemade chips are sorted. But if you want to make a lamb roast with a side of Dauphinoise Potatoes, you need a full kitchen. And if you want to be able to make it every Sunday, and you want your partner to be able to cook it just as well, then you also need to record the recipe.
Asking an expert
To answer my original question, I turned to an old colleague from my time at a What Works Centre and asked them about it.
Luke Arundel is the Evidence and Data Lead at the Centre for Homelessness Impact, and was Research Officer at TASO when I was there a couple of years ago. Luke is the most proficient user of RStudio I’ve ever seen. You know when you see a completely normal human wandering around St Pancras, then they sit down at one of the pianos and crack out a bit of Liszt and you think “crikey, how did you do that!?”.
That’s Luke with data. He’s also a bloody lovely chap too.
So who better to ask, to find out whether I need to use it, how to use it, and what should I do. And I think you’ll be interested in the answers too.
Why RStudio over other tools?
Sure, it does more theoretically, but why use it over other things? Particularly in Research and Evaluation, why does this matter? I asked Luke…
“Reproducible workflow is probably the biggest one for me. I've never used SPSS (economists seem to almost all use R or Stata), and I think there's some stuff in there for reproducible workflows, but don't think it's the same as R”
This is the first difference that makes it so useful.
In Excel, if you sort a column, or change data in a cell, or change the axis on a graph, those actions happen, but the record of it doesn’t exist. In RStudio everything you do is recorded in a line of code. Everything is documented, repeatable, and saved.
“Tools like Excel fall down very very quickly as soon as you start to get more advanced. Very basic descriptive stats will be quicker in Excel, t-test maybe it's borderline, but when you get into simple regression and beyond I find Excel gets pretty awful pretty quickly.”
This is the other big difference. In Excel, there are limits. You have a spreadsheet with data, but cross-referencing the data means having more and more complicated sheets and it starts to hit a limit. In RStudio, there isn’t really a limit to how complicated or advanced your analysis gets.
So if you’re in the ‘data analytics’ space for the long haul, get in there now!
A What Works Centre Context
Luke is coming at this from a ‘What Works Centre’ viewpoint. What Works Centres produce high quality and rigorous evaluations of social programmes in a variety of areas.
These are therefore complex, and often linked to evaluations with a Quasi-Experimental design…
“I've used it to check power calculations, analyse data, bits like that. …You also do just need to use R, Python or Stata for some analysis. e.g. if you're doing a differences-in-differences analysis, there will be R packages and Stata packages to help you, but they won't be in Excel (definitely) or SPSS (I'm 90% sure, not for the latest advances anyway).”
And it’s not just about specific methodologies that need RStudio. Luke links this to the wider ethos of how research and evaluation should be done…
"…I'd like to see more code being published of how people did their analysis. In the Magenta Book refresh, they have a new annex on transparency in research which is great…”
In essence, RStudio seems to not only help you do evaluation practically, but helps you do it in a way that conforms with the ‘spirit’ of good research and evaluation practice.
Who is RStudio for, and how long does it take?
So, we understand a little better as to what it does, but we need to know who will make use of it. Is it for you? Well, I asked Luke how much he uses it, particularly in his role now at the Centre for Homelessness Impact…
“I don't get to use it much as part of my day-to-day job to be honest as all the trials/ QEDs I work on are commissioned. Sometimes I'll have to check a power calc or something like that, but not tonnes day-to-day unfortunately at the moment! But have used it a few times for some side projects (more on this later)”
Luke is now in a role where he manages commissioned research and evaluation projects. Therefore, he no longer has to directly use it.
You might be in those kinds of roles too. In which case, you’ll need to know what it does, but not necessarily be an RStudio aficionado. But if you are responsible for actually crunching the data, you will want to strongly consider whether this is for you.
“It can be a bit of a steep learning curve but think the rewards pay off in the long run, particularly the more complex your project is. …you learn the most when it comes up in your context. e.g. rather than sitting down one day and saying "I'll learn how to merge datasets", one day you might be tasked with merging lots and lots of datasets in a reproducible way, and then R will definitely be your friend!”
And Luke insists that learning it is fun…!
“...It's fun!”
[see, I told you]
"…Like when you've got hundreds of lines of code, you're in your flow state writing code, and it spits out a final number, how can that not give you a buzz! You feel like a hacker in a movie or something!”
Learning by doing is the way. And also finding the joy in it, if you’re that way inclined.
Learning RStudio… and cheating at it
But what if you don’t have the data, or need to get up to speed quickly? Is there a way to “cheat”? I asked Luke for his tips and tricks to learn quickly.
“Paid for courses can be a bit overrated in general I think as there's so much useful stuff out there for free. …That said, this is the best course I ever did, and it was reasonably cheap I think… https://www.productive-r-workflow.com/”
The question we are all thinking though… Can I get AI to do this for me?
“AI is definitely your friend I think - it's still valuable to learn to code yourself, but AI is valuable for helping understand error, which aren't always super human interpretable - e.g. if you paste in your code and error, it'll do a really good job of saying "You got this error because you're missing a bracket, or a comma" or whatever.”
It seems like you need that basic level of understanding first, before you get ChatGPT to do it all for you. But once you have the basics, then jump in.
Without a full course, is there anything Luke can suggest as a starting point…?
“I wrote an 'Intro to R' session when I was at TASO saved here there's also a few other repos where I did things like analyse UCAS data (wrote the blog and published all the analysis behind it)
These are some really useful links from Luke here. If you’re interested, these are worth a bookmark!
It’s not just evaluation
So we know it’s good for evaluation, and Luke has given us a lot to work with. So the final thing I wanted to know before committing to learning RStudio is, what else can I do with it? Surely its not just good for evaluation…
“I've used it to build websites, e.g. the TASO one I did. See the stuff on Quarto for more on this, I wrote a blog for the SRA on Quarto https://the-sra.org.uk/SRA/sra/blog/EnhancingSocialResearchPublicationswithQuarto.aspx”
Another useful link! Also, this is mad to me. It’s not just evaluation you can use this for…
“…I did run a script to do our internal world cup sweepstake draw, and to map this to Opta probabilities to see who had the highest probability of winning the sweepstake. A fully reproducible workflow should anyone query the fairness of the draw!”
Now you’re just showing off.
So should you learn it…?
Here’s the answer I’ve landed on, as I’ve been writing this: You need to know what it does. You don’t need to be the one who does it.
If you’re managing research and evaluation, like Luke is now, then knowing RStudio exists, what it does, and when to use it, is enough. You can commission the expertise.
If you’re the one actually crunching the data, day in day out, that’s a different question. And if you want to do really strong high level evaluations, then the answer is probably yes.
For me? My work and roles sit somewhere in between these two things. Which isn’t ideal, given I started this asking a pretty simple question. The honest answer for me is that I need to decide which way I want to go with my evaluation work, and my career, and then pick a direction.
So tbc.
I want to thank Luke for his thoughtful responses. He’s a legend.