Skip to content
What's New in R is a weekly email to help you up your R game. Sign up →
R for the Rest of Us Logo

Blog

Learn to use the most powerful tool for working with data.
Even if you've never coded before.

Use smart labeling in ggplot to help your audience understand your graphs

October 24, 2024

When making data viz in R, it’s easy to think that adding label to everything will make your charts easier to understand. This is rarely the case. Instead, when making charts, maps, etc with ggplot, your best bet is to label smartly. Only labeling the most important pieces of your data viz ensures that your audience will grasp what you want them to grasp. In this blog post, I’ll show you how to use smart labeling in ggplot to help your audience understand your graphs. The issue of smart...

Today I Learned in R: the {shadowtext} package

October 17, 2024

If you spend time on YouTube looking at R content, you may have come across Andrew Gard of the Equitable Equations channel and Greg Martin from R Programming 101 . Together, they do a series called Today I Learned in R . They asked me to come on recently to share an R tip. In my conversation with Andrew and Greg, I shared one of my favorite packages: {shadowtext} . I showed them how we use {shadowtext} to ensure that text is easy to read in all situations.

How to Make a Thousand Plots Look Good: Data Viz Tips for Parameterized Reporting

September 26, 2024

In June 2024, I gave a talk at Cascadia R Conference about making high-quality data viz when doing parameterized reporting . It's something we do a lot in our consulting work . I recorded myself prepping for the talk, which you can see here. If you want to see a recording of the talk given at the conference, check out the Cascadia R Conf YouTube page . Slides Talk Abstract Data visualization is complicated enough when you are making one plot. Now imagine you're making multiple plots in...

Data viz tips for parameterized reporting: set consistent axis limits

August 1, 2024

One of the biggest challenges we face when doing parameterized is how to make plots consistent across multiple reports. We’ve learned (oftentimes the hard way) many tricks for dealing with this problem. One I want to share with you today is making your axis limits consistent when making multiple plots. Here’s an example of a plot that shows median income by county for the annual Oregon by the Numbers . Let me show you a simplified version of the function I created to make these plots. We’ll...

What's New in R

A weekly roundup of new resources in the world of R.

What’s New in R: November 11, 2024

November 11, 2024

Welcome to this week’s edition of What’s New in R ! This week, we’re featuring a tutorial on using Word templates with R, a video on creating reproducible examples, and a guide to code review best practices. Let’s dive in! Using Word templates with R If you’ve ever struggled with creating professional reports in R that match your organization’s branding, this tutorial is for you. Albert Rapp provides a comprehensive guide on using Word templates with R, leveraging the power of the officer...

What’s New in R: November 4, 2024

November 4, 2024

Welcome to this week’s edition of What’s New in R ! This week, we’re featuring a package for creating Sankey diagrams, a tutorial on creating beautiful tables with flextable, and a video guide on using ChatGPT for data analysis in R. Let’s dive in! {ggsankeyfier} The {ggsankeyfier} package brings the power of Sankey diagrams to the ggplot2 ecosystem. Developed by Pepijn de Vries, this package allows you to easily create complex flow diagrams that visualize the distribution of a variable...

What’s New in R: October 28, 2024

October 28, 2024

Welcome to this week’s edition of What’s New in R ! This week, we’re featuring a comprehensive US datasets package, a tip for customizing Quarto output locations, and an exploration of file system operations in R. Let’s dive in! {usdatasets} The {usdatasets} package, created by Renzo Cáceres Rossi, is a treasure trove of data about the United States. It includes a wide range of datasets covering topics such as US presidents, states, cities, and even NFL teams. This package is an excellent...

What’s New in R: October 21, 2024

October 21, 2024

Welcome to this week’s edition of ​What’s New in R ​! This week, we’re featuring the second edition of a popular geocomputation book, an updated version of a statistical inference textbook, and a comprehensive guide on splitting data into equal-sized groups in R. Let’s dive in! Second edition of Geocomputation with R is complete When people ask where to go to learn about geospatial analysis in R, I always point them to the book Geocomputation with R . So I was excited to see that the second...

R in 2 Minutes

Short videos highlighting useful R packages and functions.

Make all of your plots made in ggplot use consistent fonts

October 31, 2024

Have you ever struggled with keeping fonts consistent across all your data visualizations? It's a common headache, but I've got a solution that'll make your life easier! In my latest blog post, I dive into a couple of little tricks using ggplot2 that'll help you maintain font consistency without having to manually adjust each plot. Here's what I cover: Using the theme_set() function to apply a consistent theme across all your plots Leveraging update_geom_defaults() to set default font...

How to update all of your R packages

October 3, 2024

There are times when working in R that you'll want to update not just one package, but all packages you currently have installed. There are many ways to do this, but I recently saw a tip from Kurt Birson that was so good, I had to make a video to demonstrate it. In the latest R in 2 Minutes video, I show you how to update all of your R packages with just a few lines of code. Here's the code I used in the video:

How to distinguish overlapping points in ggplot

September 19, 2024

Ever made a plot in ggplot where you've got two points that are close together? It can be hard to distinguish them. I've figured out a really nice simple way to make sure all of your points are visible. Code shown in video

How to preview plots at specific dimensions in RStudio

September 12, 2024

If you've ever saved plots made in ggplot to a file, you've probably noticed that the dimensions of your plots you saw in RStudio does not correspond to their dimensions outside of RStudio. I recently learned a tip from Nicola Rennie for how to deal with this. Using the ggrecord() function from the camcorder package, you can preview plots in RStudio so that they have the exact same dimensions as when you save them with ggsave() . Code shown in video

Podcast

Conversations with users around the world about interesting things they are doing with R.

R for the Rest of Us Podcast Episode 20: Christine Parker

November 14, 2024

In this episode, I talk with Christine Parker, the Senior GIS Analyst on the Community Broadband Networks team at the Institute for Local Self Reliance. Christine shares how she used R to clean, combine, and summarize data for a dashboard tracking enrollment in the Affordable Connectivity Program (ACP), a COVID-era initiative to help people access affordable internet. The dashboard gained wide attention. It was shared in advocacy circles, referenced in Congress, and discussed with the White...

R for the Rest of Us Podcast Episode 19: Crystal Lewis

October 10, 2024

In this episode, I chat with Crystal Lewis about data management and her book titled ‘ Data Management in Large-Scale Education Research ’. Crystal, a freelance research data management consultant, shares insights on good planning and systematic implementation of practices that are key to effective data management. She discusses the importance of automated data validation, and outlines a structured approach to data cleaning. Additionally, Crystal reflects on her experience writing an...

R for the Rest of Us Podcast Episode 18: Miles McBain

August 29, 2024

In this episode, I speak with Miles McBain, a data scientist and R package developer from Brisbane, Australia, about patterns and anti-patterns in data analysis reuse. Miles shares his journey from a generalist software developer to a data science specialist, his passion for R, and the evolution of his coding practices. We delve into the intricacies of code reuse in data analysis, discussing common pitfalls to avoid, the benefits of creating reusable code packages, the process of breaking...

R for the Rest of Us Podcast Episode 17: Meghan Harris

July 25, 2024

In this episode, I speak with Meghan Harris, a data scientist at the Prostate Cancer Trials Consortium at the Memorial Sloan Kettering Cancer Center. Meghan is one of the special people who do generative art in R. She talks about why she likes making generative art in R and how it has helped her improve her R skills in other areas. Listen to the Audio Version Watch the Video Version You can also watch the conversation on YouTube. In the video version, Meghan gives a walkthrough of how to make...