Learn to use the most powerful tool for working with data.
Even if you've never coded before.
Blog
R Versus Python: Which One Should You Learn?
January 16, 2025
If there is one question I get asked more than any other, it's this: should I learn R or Python? Especially in recent years, many people have developed a vague sense that Python is replacing R (the rebranding of Posit from RStudio in order to serve multiple languages scared many longtime R users). But I think the discussion of whether R is declining is misguided. Because ultimately the question of R's decline is less relevant to the question of which language you should learn. More relevant...
Automate file management in R with the {fs} package
January 9, 2025
Imagine you’re working on a project, and you receive a folder filled with subfolders and files named in different styles: some in uppercase, some in lowercase, and with a mixture of spaces, dashes, and underscores. This disorganized chaos can make it hard to find anything, but the {fs} lets you quickly rename and organize everything to a consistent case and format. This guide will show you how to use {fs} to automate tedious tasks like creating, renaming, moving, and deleting files and...
Use geom_ribbon() to highlight the gap between two lines
December 19, 2024
I recently found this really nice graph in the New York Times and I thought it was really effective, particularly the fact that it shows two lines and only shows the spread over a specific period. So how can we replicate this in R, particularly the shading of the gap between existing mortgages and rates on new loans? In this guide, written with Joseph Barbier, I’ll walk you through the steps of creating a line chart with two lines, where the area between the lines is filled only for a...
Recreating Financial Times Data Viz of 2024 US Presidential Election
December 5, 2024
A couple weeks ago, in the wake of the presidential election here in the United States, everyone was looking for explanations for the results. One of the most compelling reasons that Donald Trump won came from John Burn-Murdoch . Burn-Murdoch, a columnist and the chief data reporter at the Financial Times, posted this graph showing that incumbents around the world had fared extremely poorly in 2024 . This graph got a ton of attention online not only because the data that underlies it strongly...
What's New in R
A weekly roundup of new resources in the world of R.
What’s New in R: January 21, 2025
January 21, 2025
Welcome to this week’s edition of What’s New in R ! This week, we’re featuring a guide to qualitative data analysis software, making 'comet plots', and a new package for elegant data manipulation. Let’s dive in! Qualitative software In this comprehensive guide, Nathan Jeffery provides a thoughtful comparison of different software options for qualitative data analysis, exploring both commercial solutions like NVivo and ATLAS.ti, as well as free open-source alternatives, some of which work in...
What’s New in R: January 13, 2025
January 13, 2025
Welcome to this week’s edition of What’s New in R ! This week, we’re featuring a tutorial on recreating Apple Music Wrapped in R, a fun maze generation package, and a guide to using meta shortcode variables in Quarto. Let’s dive in! Create Your Own Apple Music Wrapped with R While Spotify users get their yearly Wrapped experience, Apple Music users are left wanting. Andrew Heiss shows us how to create our own “Wrapped” experience using R. He walks through the process of accessing Apple...
What’s New in R: January 6, 2025
January 6, 2025
Welcome to this week’s edition of What’s New in R ! This week, we’re featuring a tutorial on creating inset maps with ggplot2, a tutorial for recreating some interesting graphs used in baseball analysis, and a guide to using Typst with Quarto. Let’s dive in! Creating Inset Maps with ggplot2 Dominic Royé demonstrates how to create professional-looking inset maps using ggplot2. This detailed tutorial walks through the process of combining multiple maps into a single visualization, with one...
What’s New in R: December 16, 2024
December 16, 2024
Welcome to this week’s edition of What’s New in R ! This week, we’re featuring a comprehensive introduction to R, a guide to exploring R objects, and a tutorial on customizing Quarto output locations. Let’s dive in! An Introduction to R Alex Douglas, Deon Roos, Francesca Mancini, Ana Couto & David Lusseau has written a free book for learning R from the ground up. This comprehensive guide covers everything from basic R concepts to data visualization and analysis, with a focus on making R...
R in 2 Minutes
Short videos highlighting useful R packages and functions.
Use the view() function to quickly look at your data in R
December 5, 2024
Ever want to take a quick look at your data? In my R in 2 Minutes video, I show how to use the view() function to quickly display data in a separate window. I explain why it's useful at the end of pipelines and how to combine it with functions like filter() . It’s a simple trick that can save time and prevent headaches when working with data in R.
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
Podcast
Conversations with users around the world about interesting things they are doing with R.
R for the Rest of Us Podcast Episode 22: Alex Gold
December 12, 2024
In this episode, I chat with Alex Gold, who leads solution engineering and support teams at Posit. We talk about his new book ‘ DevOps for Data Science’ , and explore why DevOps principles are crucial for data scientists, even if you aren't working in hardcore production environments. Alex shares insights on how to think about putting your data science projects into "production"—whether it's a report for colleagues or a full-scale deployment. We discuss practical tips like using {renv} to...
R for the Rest of Us Podcast Episode 21: Cédric Vidonne
November 29, 2024
In this episode, I talk with Cédric Vidonne, an Information Management Officer at the United Nations High Commissioner for Refugees (UNHCR) with over 15 years of experience in humanitarian data visualization. Cédric shares his journey from GIS and cartography to creating impactful infographics and embracing the R programming language. He discusses how R has revolutionized data efficiency within UNHCR, where it aids in producing faster, reproducible data products essential for crisis response....
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...