Skip to content
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.

Hide text labels with small values to make charts made in ggplot easier to read

March 13, 2025

One issue that we often face when making data visualization in reports is text not fitting into graphs. This happened to us when working on reports for the Connecticut Data Collaborative and the Partnership for Strong Communities in Connecticut. The reports we made , which show key demographic and housing indicators for towns and counties across the state, have bar charts that show the housing cost burden for renters and home owners in the state. In addition to the categories severe burden...

From Overwhelm to Organization: Optimizing Data Workflows in R

February 20, 2025

Ever feel overwhelmed by a messy R script that's grown out of control? That's exactly what happened to Alberto Espinoza , Knowledge and Learning Manager at PEAK Grantmaking . In his job at PEAK Grantmaking, an organization that helps philanthropy to use equitable, effective grantmaking practices, Alberto supervises a Grants Management 101 class . As part of this training, Alberto has to analyze data from surveys that participants complete. With this training happening regularly, the data from...

Report Design in R: Small Tweaks that Make a Big Difference

January 30, 2025

In August 2024, I spoke at posit::conf about doing report design in R . As I say in the talk, I never thought I'd become known for making nicely designed PDFs , but it's one thing we at R for the Rest of Us have become known for in the R world. The talk, titled Report Design in R: Small Tweaks that Make a Big Difference, was a great chance for me to share some of the things we've learned about making good reports, focusing on consistency, avoiding defaults, and incorporating brand elements...

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...

What's New in R

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

What’s New in R: March 17, 2025

March 17, 2025

Welcome to this week’s edition of What’s New in R ! This week, we’re featuring a tutorial on creating population pyramids, a new package for air pollution analysis, and an innovative exploration of social media data using AI and the tidyverse. Let’s dive in! Plotting Age Pyramids with ggplot Jose M. Sallan provides a detailed tutorial on how to create population pyramids using ggplot2. Population pyramids (which I’ve also written about here and here ) are essential tools for demographic...

What’s New in R: March 10, 2025

March 10, 2025

Welcome to this week’s edition of What’s New in R ! This week, we’re featuring the winners of the Posit Closeread prize, a fantastic tutorial on creating histogram legends in ggplot2, and a package for analyzing wildfire exposure data. Let’s dive in! Winners of the Closeread Prize – Data-Driven Scrollytelling with Quarto Posit has announced the winners of their Closeread Prize, which challenged developers to create scrollytelling projects (you’ve probably seen them in places like the New York...

What’s New in R: March 3, 2025

March 3, 2025

Welcome to this week’s edition of What’s New in R ! This week, we’re featuring a new code formatter from the Tidyverse team, an analysis of TSA screening data with epidemiological weeks, and a tutorial on building RAG-based AI prototypes in R. Let’s dive in! Air: An Extremely Fast R Formatter The tidyverse team, led by Davis Vaughan and Lionel Henry, has announced Air, a new R code formatter that promises to be incredibly fast. Air is designed to automatically format R code consistently while...

What’s New in R: February 24, 2025

February 24, 2025

Welcome to this week’s edition of ​What’s New in R ​! This week, we’re featuring an analysis of homelessness and rent in Canada, tips for Quarto presentations, and techniques for optimizing spaghetti plots. Let’s dive in! Analyzing Homelessness and Rents in Canadian Cities Jens von Bergmann and Nathan Lauster have created an in-depth analysis exploring the relationship between homelessness and rental markets across Canadian cities. Using R for both data analysis and visualization, the post...

R in 2 Minutes

Short videos highlighting useful R packages and functions.

How to use the add_row() function in R

March 6, 2025

Ever needed to quickly add just one row of data to your dataset in R? Maybe you forgot an entry or want to add something new? I recently ran into this exact situation while making a chart with my son showing the highest soccer goal scorers of all time. He wanted to add himself to the list (dreaming big, right?). In this quick video, I show you how to use the add_row() function from the tidyverse to easily add a single row of data to your existing dataset. It's super straightforward - you just...

How to read in hundreds of CSV files with one line of code

February 13, 2025

Ever found yourself staring at a folder full of CSV files, wondering how on earth you're going to import them all without writing a ton of code? I've been there! I used to think I needed some complex solution, but it turns out you can do it with just one line of code. In this quick video, I show you how to: Use the {fs} package along with the tidyverse Create a vector of all your CSV files in a directory Import them all at once using read_csv() (not read.csv()!) The best part? This method...

How to generate QR codes in R

January 23, 2025

Ever given a presentation and wanted an easy way for people to access your materials afterwards? I recently discovered a neat solution: adding QR codes to slides! In my recent posit::conf() talk, I used QR codes to help people quickly access my slides, GitHub repo, and website – no need for anyone to frantically type in long URLs. I've made a quick R in 2 Minutes video showing how to use the qrcode package in R to automatically generate these QR codes. Here's what I cover: Using the qr_code()...

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.

Podcast

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

R for the Rest of Us Podcast Episode 25: Robert Smith

March 20, 2025

In this episode, I chat with Robert Smith, a health economist and co-founder of Dark Peak Analytics. Rob shares his unique career path from academia to advising the UK government during the COVID-19 pandemic, where he helped shape public health decisions through data modeling. We also discuss his work with Parkrun, a free community running event, and how data science can be used to promote equitable access to fitness. Using R, Rob and his team analyzed participation trends and developed...

R for the Rest of Us Podcast Episode 24: Simon Couch

February 27, 2025

In this episode, I chat with Simon Couch, a software engineer at Posit, where he develops open-source statistical software and maintains several R packages. Simon’s work spans AI-powered coding tools that enhance R workflows and improve efficiency. We dive deep into his latest projects: {pal} (renamed to {chores}) – an AI-powered assistant that streamlines code updates and automates tedious R programming tasks. {gander} – an innovative tool that integrates AI into RStudio and Positron,...

R for the Rest of Us Podcast Episode 23: Terence Teo

February 6, 2025

In this episode, I chat with Terence Teo, Professor at Seton Hall University and expert in creating stunning 3D maps using the {rayshader} package in R. Terence discusses his journey into data visualization, specifically his use of R and the RayShader package to create mesmerizing 3D maps. Terence shares insights from his academic background in political science, his creative process for making maps, and how he balances artistic flair with technical rigor. The discussion dives into geospatial...

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...