14 Come for the Statistics, Stay for the Community
I bet you initially learned R to do statistics. It’s what brings in most people, and R is an undeniably excellent tool for statistical analysis. But I hope I’ve convinced you that R is much more than a tool for statistics. Throughout this book, we’ve seen how can R help you to:
- Illuminate your work through data visualization, maps, and tables.
- Communicate using R Markdown to make reports, presentations, and website.
- Automate your workflow to access data, create your own functions, and even combine your functions into your own R package.
There’s a lot that you can do with R when you’re not doing statistics!
But there’s something else about R that makes it worth learning, and it has nothing to do with whether or not you’re using it for statistics. The best reason to learn R is the community. Whether you’re just starting out or are more experienced but learning a new technique in R, R’s welcoming community can offer support along the way.
There’s no way around it: learning to program is hard. When I was learning R, I went through a period where I would try to start a project in R, only to encounter a problem I couldn’t solve. Tail between my legs, I’d crawl back to Excel. This went on for several months, and at times I was convinced I’d never be able to use R.
Allison Horst has seen this bumpy journey to R proficiency many times. An experienced educator and illustrator, she draws the feelings that many R learners go through. Figure 14.1 was definitely me as I tried to transition from Excel to R.
Even experienced R users feel this frustration when learning something new. I can’t tell you how many times I’ve tried and failed to work with a complicated data structure in R known as lists. It feels like my brain just doesn’t – and won’t ever – get it.
This frustration is something programmers of all languages have experienced. But R users are lucky to have an incredibly welcoming community to get help. This is a marked contrast to many other languages, where programmers have a well-earned reputation for being prickly and unhelpful. The acronym RTFM (read the f***ing manual), which some programmers use as a reply to dismiss what they consider basic questions, is the perfect encapsulation of this phenomenon.
The R community is different. Newbies are encouraged. Questions, no matter how basic, are answered with grace. Users of diverse backgrounds are encouraged to take up R. The R community is not perfect, but it is better than most programming communities, and its welcoming nature is the best reason to take up R.
How the R Community Came to Be Welcoming
My favorite example of how welcoming the R community is came in May 2019. Eileen Parkes, a UK-based researcher, posted that she was thinking about learning R. Her nerves were apparent, as seen in Figure 14.2.
Parkes received hundreds of encouraging responses from R users around the world. Things like this from data scientist Jon Harmon: “[R] is the friendliest, best documented language I ever tried, and I finally feel like I mostly know what I’m doing, after many false starts. You’ve got this!” The overwhelming positivity was unlike anything I had ever seen. How did the R community come to be so welcoming? I asked this question on Twitter and the answers I got focused on four main areas.
First, most R users come to R from some other discipline. They are biologists, sociologists, public health researchers, and so on, and they need a tool to analyze their data. As data scientist Ben Shaver put it,
Because the typical R user came to it as a means to an end, and not from a [computer science] background. People are enthusiastic about a tool that lets them do what they REALLY care about, and less likely to be pedantic about the right way to use that tool in general.
What’s more, for R users who are experts in some topic, it is a humbling experience to be so accomplished in one area but have to learn something like R from scratch. As a result, most know the pain that new R users go through when starting out, and are keen to offer support.
Second, many prominent users are supportive of efforts to make the R community welcoming. This is important because, Hadley Wickham, lead developer of the tidyverse, told me, the R community wasn’t always welcoming. My tweet prompted Wickham and users to recall that it had previously been commonplace to see RTFM hurled at other R users. By displaying kindness and grace, Wickham and others have helped to shift norms in the R community.
Third, R users are more gender diverse than those of other languages. Over half of the American Statistical Association’s membership is made up of women. And users who come from disciplines like biology, sociology, and public health tend to include more women than languages made up of those with male-dominated backgrounds such as computer science.
Fourth, there are a number of groups that support diversity among R users. The most prominent of these is R-Ladies. Started in 2012 by Gabriela de Queiroz, this group sees its mission as “encouraging, inspiring, and empowering people of genders currently under-represented in the R community.” R-Ladies has over 200 chapters in cities across the world. Through events, online networking, and more, R-Ladies has helped thousands of women and other gender diverse people find their place in the R community.
In addition to R-Ladies, there are other organizations working to make the R community welcoming to all. The Minorities in R (MiR) group is working to increase racial and ethnic diversity. Both R-Ladies and MiR receive funding from the R Consortium, which works to promote R usage around the world.
There are also places new and experienced users alike can find online and offline support. Social networks Twitter and Mastodon have a wide range of users who use the #rstats hashtag to discuss all things R. The online learning community known as R for Data Science (after the book of the same name) hosts a Slack community where users can ask questions and more experienced users provide answers. There are also local R user groups in cities around the world (many can be found on the website meetup.com) that host events. No matter your background or location, you can find a place in the R community.
Making the R Community Welcoming for Underrepresented People Helps Everyone
I’m a straight white male living in the wealthiest country in the world. It would be easy to think that efforts to make the R community welcoming make a difference to others, but not to me. That’s simply not the case. To explain why, let me use what might initially seem like a far-flung example.
In 1971, the city council of Berkeley, California authorized the construction of curb cuts at fifteen high-traffic street corners. This came after years of protests by disability rights activists, who argued that sidewalks without curb cuts were discriminatory because those in wheelchairs could not traverse them. After these curb cuts were built, people began to realize that they helped not only those in wheelchairs, but others as well. As disability activist Deborah Kaplan told the podcast 99 Percent Invisible in 2021,
What was originally thought of as something just for people in wheelchairs ended up being just taken for granted by everybody and used in ways that weren’t even originally anticipated for the benefit of many, many more people than originally thought of.
This is exactly what has happened in the R community. Efforts to make R welcoming for underrepresented groups have benefited everyone. Those coming to R find a community ready to welcome them and answer their questions. I asked many questions early on in my R journey that could have easily been answered with RTFM. But they weren’t, and, as a result, I persisted through my early struggles. I credit the community with much of the success I’ve had with R. And I’m happy to join others in creating a welcoming community for others looking to learn R.
You’ll often hear people say that they are a “self-taught programmer.” Many people in the R community have proposed an alternative: community-taught programmer. Allison Horst has even created an illustration, seen in Figure 14.3 below, that shows all of the ways that users learn with the support of the R community.
Learning R is way less scary than learning other languages because you always have the support of a welcoming community.
My goal in writing this book is to show you that R is more than just a tool for complex statistics. If I initially sucked you in with that idea, I’ve done my job! But as we reach the end, I hope to leave you with something very different. You may have started using R for statistics, you may now be excited to use R without statistics, but the reason you’re likely to stay with R is the community.