Skip to content
R for the Rest of Us Logo

Tips and Tricks

Parameterized Reporting with RMarkdown

October 15, 2020

Have you ever had to make a set of reports that all look alike? Perhaps you're making one report for each school in your district. Doing this manually is, I probably don't need to tell you, a huge pain. Fortunately, R has a solution to this problem: parameterized reporting . Parameterized reporting is a feature of RMarkdown that allows you to design a single report template and then use it to generate tens, hundreds, even thousands of reports at the same time. When I was starting to learn R,...

How to Keep Your R Packages Up to Date

September 8, 2020

A user who recently completed my Getting Started with R course sent me an email to ask a common question for those starting out with R: How do you keep your R software up to date? As far as I know, there are no automatic updates for R, RStudio and packages. And as updates are quite frequent, it is quite a hassle to check every few weeks (or even days) if there are new versions available. This is the kind of thing that experienced R users have often internalized to the point that they often...

How to Evaluate R Packages

July 25, 2020

One of the challenges for people learning R is this: there are often many ways to accomplish the same goal. This is, of course, also a benefit (if you don't like the first approach, just try another one!). But when you're just starting out and don't have much experience with R, multiple solutions to a problem are more likely to be confusing than helpful. This dilemma often shows up in one of the most common questions I get from new R users, which I tweeted about last year. The responses to my...

Using Word Reference Documents with RMarkdown to Create Custom Reports

July 13, 2020

Defaults are the worst. See this plot? If you see a plot that looks like this, you know two things: It’s made with ggplot The person who made it didn’t even take the time to change any of the defaults Don't settle for defaults! It's one of the messages I discuss throughout the data visualization section of my Going Deeper with R course . Avoiding defaults is also something you can with RMarkdown as well. When you knit an RMarkdown document to Word, it takes on the default styles in Word. On...

How R Has Been Used to Look at Issues of Race and Policing

June 15, 2020

The last few weeks have brought global protests over police violence against black people and other people of color . These protests have sprung up in response to the death of George Floyd, but their size shows that they are about more than the brutal killing of one man. The breadth and depth of a complex and multifaceted problem such as police violence is often hard to quantify. That's why it's so important that groups exist that are collecting, organizing, and sharing data related to police...

Why I'm Donating 1% of Sales to Important Causes

June 1, 2020

For a while now, I've been considering donating revenue from my business to support groups working for social justice. The murder of George Floyd and the protests that have sprung up in its aftermath have convinced me that it is time to do this. Starting today, I'm donating 1% of all sales of online courses to groups working to bring about a more just society. In the future, I'll support a range of organizations, but I'm going to begin by supporting the work of the Equal Justice Initiative ....

How to Add Color to Titles Using the ggtext Package

May 12, 2020

If you read experts on data visualization, you'll start to see some common suggestions. One of these is use titles not just to describe your chart, but to explain your findings. Instead of generic titles like "Change in Math Scores, 2017-2018 to 2018-2019," they suggest, try something like, "Most Students Improved Their Math Scores From Last Year to This Year." In addition to using text in this way, data viz experts also suggest using color to highlight findings. See, for example, this...

How to Download Data in R

April 28, 2020

When you work with most data analysis tools, the first step in any project is to download your data. Your workflow might look something like this: Go to the website where the data is located Find the data you need Download the data to your computer Copy the data to where you need to in order to begin analysis With R, it’s different. You can download data from within R itself, as I show in this video demonstration (which, incidentally, is from my upcoming Going Deeper with R course ). There...

Analyzing the R for the Rest of Us Audience Survey

April 11, 2020

In February, I asked you to help me figure out what to do next with R for the Rest of Us. As I wrote at the time: Moving forward, I want to focus my efforts on the types of learning that resonate with you. I’m also thinking about offering opportunities to learn about particular topics that I think people might be interested in (e.g. mapping with R). But again, I don’t know which topics will resonate with my audience unless I ask you. Nearly 200 of you were generous enough to respond to the...