RYouWithMe: The inspiration
I’m Lisa Williams, a social psychologist at UNSW Sydney, and co-founder of R-Ladies Sydney. Truth be told, I’m a complete R newbie. Sure, I’ve executed a few commands here and there. But I’ve found R daunting: the workflow, the pure number of packages, and the ‘cross-your-fingers-and-hope’ nature of executing a command. Yet, increasingly, R is the answer to many of my problems - from data wrangling to visualisation to analysis, the result of my searches for how to achieve something is: “you can do it in R”. A heart-sinking moment for a not-confident R newbie. I got involved in organising R-Ladies Sydney in part because I knew it would create the communal and inclusive space in which we could support folks like me to finally take the dive into learning R.
I’ve attended all of our R-Ladies Sydney events to date, dutifully following along with the activities - at least at first. But I would quickly get ‘in over my head’. Wait, where’s the data? Why am I getting that error? Why do I need quotes here and not there? So. Much. Frustration. Surely I wasn’t alone.
In talking to two other R-Ladies Sydney co-founders, Jen Richmond and Danielle Navarro, we realised that we needed to better support our newbies (me included)!
RYouWithMe: The plan
The result: RYouWithMe - a series of online learning resources for using R - designed by us, for us. The series is oriented towards R beginners and aims to provide a solid foundation of R skills. That way, future R-Ladies Sydney activities can be accessible to more of our members. Frustration no more! (or at least minimised!)
We have five ‘units’ planned:
1. Basic Basics
2. Clean it up (aka Data Wrangling)
3. VizWiz (aka Visualisation Wizardry)
4. Behind the Curtain (aka The Language of R)
5. MarkyMark (aka RMarkdown reports)
Our rather ambitious aim is to roll these out by the end of the year - with Basic Basics going live Monday 4 November.
You’ll be able to access all of the units and lessons within them here on the R-Ladies Sydney website. The series builds skills cumulatively - so we encourage you to ‘start from the start’. For later units, we’ll provide a brief summary of where you should be up to before diving in.
We strongly encourage all of you local to Sydney to join us over on our Slack space. There, you can join me and a cohort of fellow learners - and our generous teachers! We’ll support one another, and build a local network while we’re at it! Even if you’re joining us later down the track, the Slack space will be an invaluable resource for troubleshooting! As you’ll see below, learning together is evidently where it’s at when it comes to learning R.
If you’re not from Sydney, or opt not to join Slack, you can of course follow along the lessons here on the site.
RYouWithMe: Co-founder to co-founder(s) AMA
To kick off this series, I wanted to take the opportunity to learn about Jen and Danielle’s journey in learning and using R. I convinced them to indulge me with an Ask Me Anything (AMA) session. I posed questions that these two RLadies dutifully answered. Below is the result!
Alright - we’ll start broad! When did you start learning and using R? Did you have to ‘take the leap’ from another software? Did you find the process intimidating or exciting? And how long did it take for you to be ‘sold’ on R’s awesomeness?
Danielle: I came to R from Matlab back in 2009, after finally getting frustrated with licencing restrictions. I found it hard going initially: I’d become very reliant Matlab’s way of doing things and became really frustrated when things that I’d previously been able to do quickly would take me an eternity. The thing that sold me on it, besides the financial gain, was the package system: if I didn’t know how to do a thing I could google it and it would usually turn out that someone else had implemented a solution. It felt like being part of a bigger programming community!
Jen: I have only been learning R for about a year, although now I am annoyed that I didn’t make the jump from Excel/SPSS sooner. Originally I started learning because I want to do a particular kind of analysis that was hard to do in SPSS, but I’ve come to realise that R is about way more than statistics. The data wrangling and visualisation power is a really the big selling point for me. My research involves eye-tracking and psychophysiology, which each generate tons of data that you need to boil down to some “analysable” form. I had been doing that with Excel macros. Now with R, I am saving myself hours and ending up with much more reproducible results.
I think one of the barriers to learning R is the sense that the ‘wins’ can be a long way off. Can you recall a recent joyous moment working in R? An achievement in getting some code to work? Or some particularly wonderful output? Convince us that there’s light at the end of this!
Danielle: The moment I worked out how to make “Brownian bridge” GIFs was one of the most satisfying experiences I’ve had with R. I loved it so much not just because they’re fun and pretty, but also because it mixes a very new tool (the
gganimate package) with the Brownian bridge sampler I found buried in one of the very first R packages I learned (
e1071). It felt like a perfect mix of new and old, and while it’s not really the most useful thing I’ve done in R it made me happy.
ggplot gives me joy every day. It is so easy to group_by a different variable and change what you are plotting. I also take great joy in using visualisation to discover errors. Excel and SPSS let you get too far away from your raw data; most of the time you have averaged the hell out of it before you try to make a figure. It is really easy to plot raw data in ggplot (we will cover this in the Vizwiz unit!) so you can easily spot mistakes or outliers. I love geom_point().
Convincing cases, both of you! But, we all know it’s not sunshine and roses. How about a recent time when your laptop nearly got chucked out the window? A time of real frustration? Bonus points for letting us know how you got past it!
Danielle: Oh, so many stories. I’m almost paralysed trying to choose! The most recent one would probably be dealing with blogdown - I love blogdown, but it’s a bit of a mishmash of different tools and there’s so many ways you can break it if (like me) you’re not careful. The R-Ladies Sydney blog uses a really simple template, and it’s minimal enough that I can tinker with it. But my personal blog uses the academic theme, and when I had to switch from Mac to Windows a couple of weeks ago I lost the ability to update the page (soooo embarrassing!) I have no idea what I did wrong, but the only way I could fix it was with a complete do-over: reinstalled everything from scratch into a fresh directory, then copied the posts over. It’s still doing something weird though and I don’t understand why :-)
Jen: This year I resolved to give up SPSS do all of my data wrangling/analysis in R so I was constantly trying to learn how to do the most stupidly simple things that would take me a couple of minutes in Excel. Like…. calculating the age of the kids in a particular study but expressing that age in months. I spent a whole afternoon trying to simply subtract the kids’ test date from their birthdate and then turn that age in days into months. I could make it give me age in years, but dividing the days by 30 gave me something that looked like months but was still in day format … it was a nightmare. As it turns out R is really particular about dates and you need to use a package called
lubridate to get around all kinds of assumptions about date formats.
The solution to all of my R problems is usually #rstats Twitter. The community on Twitter are SO KIND and GENEROUS; I asked the question there and had heaps of people jump in and help me. It’s great. Of course, there is no way that I will remember the solution to that calculating age problem, so rather than starting from scratch with my googling next time I wrote a blog post about it. My thoughts here might not make sense to anyone but me but if you need to calculate age (or use lubridate) check it out here
Bonus points awarded to both!
Danielle & Jen: Thanks, Lisa!
Speaking to newbies now, looking back, what is one practice you wish you had put in place early that would make your life using R easier now?
Danielle: Why did I not use RStudio projects (and/or the “here” package) from the beginning??*
Oh also, why is my documentation always so terrible?! I’m only very slowly learning that “me in six months time” is a complete stranger who has no idea what I’m thinking and doesn’t agree with me about anything, so she needs to be given clear instructions about how to make sense of my code. It makes sense to me now, but it never makes sense to me later. Must. Leave. Better. Comments.
Jen: I’m with Danielle on this one, working directories in R are the worst! I’m still not sure I get it, but always working in a Project and the
here package helps. We will show you how to use Projects and
here in the Basic Basics module so you can avoid that pain.
Now we’re at the get-to-know you stage of the AMA! What’s your ‘favourite’ package? I know - it’s like picking a favourite child or pet… I’ll allow a categorised answer “favourite package for X” and “favourite package for Y”.
Danielle: I feel like it’s cheating to say
tidyverse since that’s not one package and besides, everyone loves tidyverse right? But still… the thing I love about tidyverse is that it takes things that previously felt effortful and makes them natural. Whether it’s manipulating data with
dplyr, playing with text with
stringr, or functional programming with
purrr, I find that it consistently makes it easier for me to “just do my job” rather than think “okay… how do I do X?”
Outside of tidyverse,
rjags is my favourite statistics package because I use JAGS to do Bayesian analyses, and it’s so nice to be able to cleanly interact with it from R. For no particular reason I am also a huge fan of
Jen: Ooooo so many! Let’s start with
datapasta, which allows you to copy and paste table shaped data from anywhere into R as a dataframe. I have recently discovered
janitor; so far I have just used the clean_names() function, which does what you would expect – makes all your column names nicer– but I suspect it is full of all kinds of useful helper functions. I like
ggbeeswarm, which is a
ggplot addin that allows you to plot the distribution of raw data but adds a little bit of noise so that all the points don’t overlap each other. I could go on and on….
I’m just going to trust you both that you’re not making these package names up! Purrr? Datapasta??
I’ve considered it a privelege to co-found R-Ladies Sydney with you both. I’m curious to hear what you’ve liked most about your experience with R-Ladies?
Danielle: Oh, so many things! I could say a lot about how wonderfully supportive R-Ladies are in helping each other learn both in real life and on twitter, but I think one of the huge things about R-Ladies is that it provides a safe space. I’ve had a couple of experiences of my own where supportive comments by R-Ladies have helped me deal with some genuinely scary moments, and I know other people have too. Knowing that other R-Ladies will always be there for you is a huge deal, and is one of the big reasons I care so much about trying to give back.
Jen: RLadies are so generous. Inevitably, when I am on Twitter asking a stupidly naive #rstats question, it is an RLady who is the first to pipe up and offer a solution. The international community is just great. I love that the whole organisation is centred around learning. Whether you are totally new or an absolute expert, there is always something new to learn and an RLady who would love to help you out.
And finally, what is one piece of advice you’d give to our RYouWithMe participants who are jumping into R as relative newbies?
Danielle: Don’t be afraid to ask questions! There’s a whole community of R-Ladies willing to help!
Jen: Apply what you are learning to your own data. It is all very well to follow along with our modules and be able to run code on the perfect data in the examples, but we know that data in the real world is never perfect and transferring new skills into the real world is the hard bit. Try out what you are learning on YOUR data and post your frustrations (there will be frustrations) in the slack channel so that we can help each other and see that everyone is in the same boat.
Fantastic! Thank you, Jen and Danielle - I’m sure I speak on behalf of the rest of R-Ladies Sydney when I say that your insights are invaluable!
So, RYouWithMe? I certainly hope so! Basic Basics will launch 4 November!
I’ll be learning alongside you - and hope to see you Sydney-siders on Slack!
I’d like to take this chance to also thank those of you who’ve volunteered as teachers for RYouWithMe! We’ll be in touch soon with ways you can help out!
Thoughts? Ideas for units? Want to get involved as a teacher? Email us at email@example.com! We’d love to hear from you!
In the spirit of celebrating successes, I created and formatted this post in a R-Markdown file! (of course, under the tutelage of Jen and Danielle)! Yes, there was at least one ‘chuck laptop out window’ moment, but I got through it - and thankfully my laptop is still intact.