Skip to content
R for the Rest of Us: A Statistics-Free Introduction is out now! Check it out →
R for the Rest of Us Logo

R for the Rest of Us Blog

How To Make Data Viz That Matches Your Organization's Branding

Here at R for the Rest of Us, we make a lot of reports for clients . And one of the most important things we do in these reports is use the clients' colors throughout. Picking a color scheme that ties in with a client's brand or that evokes the subject matter behind the data is what allows the plot to contribute to, rather than detract from, the main story the client is seeking to tell. It's what we've done for the last several years working on Oregon by the Numbers . The report uses the...

A Chat About Tidy Data

Tidy data is one of the most complex concepts for participants in R in 3 Months . Even before they get to the actual coding involved in data tidying, many struggle with what tidy data is exactly. I introduce tidy data to R in 3 Months participants through this lesson (which comes from the Going Deeper with R course ). In it, I try to give an overview of what tidy data is and why it's beneficial to use it. But, for many people, this isn't enough. Understanding tidy data takes several weeks —...

2021 Year in Review

As 2021 comes to a close, I wanted to share what R for the Rest of Us has been up to this year. It's been a busy year and just trying to remember everything we did has been a challenge! You'll notice first of all that I said we. I've always used I when referring to the business because, before 2021, it was pretty much just me running R for the Rest of Us. In the beginning of the year, I decided it was time to bring on others to help me. Throughout the year, I've worked with others on courses,...

I've Hit My Enough Number

A couple years ago, I read Paul Jarvis's book Company of One . The book argues that the idea of growth for its own sake is often misguided. Instead, businesses should grow at a speed that fits with the work and personal goals of their owners. I loved the whole book, but one idea has really stayed with me as a business owner: the need to define an enough number . Rather than constantly seeking more revenue, define what you're working toward and stop when you get there. 2021 has been a very...

How to Create Multicolumn Layouts in RMarkdown

In a lot of the consulting work that R for the Rest of Us does , we do complex layouts of the sort are typically done with page layout software like Adobe InDesign. For example, in the reports we did on demographic and housing data in Connecticut , the charts were laid out in a complex grid across multiple pages. Or take a look at these reports , done in partnership with the Democracy Funders Collaborative's Census Subgroup and ORS Impact , that provide an overview of efforts to promote the...

How to Make a Diverging Bar Chart in R

Much of the credit for this blog post goes to Thomas Vroylandt . Before we began working together regularly , I made diverging bar charts but never really understood how things worked. Thomas has helped me truly understand how to make these visualizations. In a previous life, I worked in the world of program evaluation . In this work, I did a lot of surveys. And in these surveys, we often used Likert scales for answer options. For example: Question: How good is the education at your school?...

How to Set Your Default Package Install Location in R

One problem that people often have, especially when they work on Windows network drives, is that they can't install packages. This typically happens because they don't have admin rights on their computer and by default R tries to install packages into a location that requires admin rights. To see where your packages are installed to by default, type .libPaths() in the console and hit enter. If you use a Windows network drive, you may see something like this: This shows two paths: The first...

My R Journey: Ibrah Sendide

My name is Ibrah Sendide and I am a PhD candidate at the University of the Witwatersrand, Johannesburg. My work in health economics and outcomes research includes modelling cost effectiveness in health, statistical data analysis and econometric analyses. I recently completed the R in 3 Months program and wanted to share about my experience with it, and with R in general. When I came across David Keyes' Twitter profile , I saw that he made coding in R less daunting. A click on the link in...

How I Structure My RStudio Projects

During his presidency, Barack Obama famously wore only gray or blue suits ( with one minor exception ). In a 2012 interview with Vanity Fair, he explained why: I'm trying to pare down decisions. I don't want to make decisions about what I'm eating or wearing. Because I have too many other decisions to make. This idea of using routines to limit the number of decisions you have to make and save your brain's processing power for important choices applies well beyond the sartorial choices of...

How to Scrape Data with R

Those of us who work with R dream of just one thing: getting clean data, ready for analysis. Rarely does this happen, of course. As Steve Lohr wrote in the New York Times in 2014 , those working with data: spend from 50 percent to 80 percent of their time mired in this more mundane labor of collecting and preparing unruly digital data, before it can be explored for useful nuggets. Sometimes messy data comes in, ahem, creatively organized spreadsheets. Other times it comes as numeric values...