Skip to content
R for the Rest of Us: A Statistics-Free Introduction comes out June 25th. Or you can read the online version today. Check it out →
R for the Rest of Us Logo

R for the Rest of Us Blog

Make your code output easier to see in RStudio

When I live code, it's often the little things that I do that people are most interested in. I was recently doing some live coding and someone asked how I changed where the output of my code showed up when working in a Quarto document. Here's a short video to show you how to change your code chunk output to show up in your console when working in RStudio.

Parameterising a multi-part plot

Today’s #rstats exercise in building parameterised plots is brought to you by my desire to avoid copy-pasting and making minor edits to 200+ lines of code in order to create two variants of a set of interactive graphs for a client. I decided to blog my way through the process to highlight a few tips and tricks I’ve picked up along the way. The visualisation I’m working on comprises 5 graphs, all interactive (and connected to each other in their interactivity), and all created straight from...

What’s New in R: June 17, 2024

Welcome to this week’s edition of ​What’s New in R ​! This week, we’re featuring an article on the value of using R, a tutorial on writing your own functions, and a blog post showing how to get R to send texts on your behalf. Let’s dive in! How (and Why) I came to Use R for Data Analysis and Evaluation This article, written by Alberto Espinoza, talks about the value of using R in the context of evaluation . But it’s a useful read, even if you work in a very different industry. Alberto talks...

R for the Rest of Us Podcast Episode 16: Cara Thompson

In this episode, I speak with Cara Thompson about color, delving into several aspects of its use in data visualization. Cara is a UK-based data visualization consultant with over 15 years of experience in transforming data insights into clear, compelling visual stories. We explore how she finds inspiration for selecting colors, her reasons for not simply using organizations' brand colors in her visualizations, and the importance of dedicating time to thoughtfully consider color choices in...

What’s New in R: June 10, 2024

Welcome to this week’s edition of ​What’s New in R ​! This week, we’re featuring an analysis of households with many cars, advice on naming files, and a package to make flow charts. Let’s dive in! Where are the 4+-car households? In my years of teaching R, I’ve found that one of the most useful ways to help people learn R is to read tutorials that go from start to finish on an analysis. This blog post by Harald Kliems does just that, demonstrating how you could get and analyze data from the...

How to create maps of the US with ggplot

Ever wanted to create a map of the US with ggplot? We know that we have. For example, for our Oregon Voices project , it was invaluable to have a great package that allows to create nice charts of the US. In this blog post, we show you how to get started with creating maps in R. And with that said, let’s dive in. Our first map chart We start with a simple map of the US. The cool thing is that we don’t have to do much work to make that happen. All of the heavy lifting is done for us by the...

What's New in R: June 3, 2024

Welcome to this week’s edition of ​What’s New in R ​! This week, we’re featuring an introductory workshop on R, a tutorial on customizing ggplot legends, and a walkthrough to help you get a Quarto-based website set up and hosted online. Let’s dive in! Introduction to R and RStudio Part 1 The UK’s National Health Service (NHS) has many R users. The NHS-R Community recently hosted an online intro to R workshop, which they’ve posted online. This looks like a great resource for those just...

R doesn't round the way you think it does

I can't tell you how much time I've spent thinking about rounding in R. Rounding, you ask? Yep! Rounding in R can be confusing because the way R rounds numbers is different than what you might expect. Here's how it works!

What's New in R: May 28, 2024

Welcome to this week’s edition of ​What’s New in R ​! This week, we’re featuring two tutorials on manipulating images with the {magick} package and a package that helps you make better line charts. Let’s dive in! Convert iPhone Photos to PNG in 12 Lines of R Code! File this under things you might never have considered using R for but are actually quite useful: In this YouTube video, Lee Durbin shows how to use R to convert photos from the iPhone-specific .HEIC format to the more common .PNG...

How to remove unwanted texts in your data

Text cleaning is a common part of data analysis. You may not really want to do it but it’s often necessary. For example, have a look at this data set from tidyTuesday. It shows you the stock prices of some big tech companies. Maybe you want to work only with this financial data set. But at some point you will probably have to communicate your findings to someone else. And if these people are anything like me, then they probably don’t immediately know which company is meant by a symbol like...