Skip to content
R for the Rest of Us Logo

R for the Rest of Us Blog

How to Use the Scales Package in R for European-style Number Formatting

Hello, my European friends! Ever read the number 123.45 (formatted in the American style where the period is the decimal point) and wish you could easily convert this to a European-style 123,45 (where the comma is the decimal point). You can! In this R in 2 Minutes video, I show you how to use the scales package in R for European-style number formatting.

What's New in R: April 1, 2024

Welcome to this week’s edition of ​What’s New in R ​! This week, we’re featuring tips to make interactive data viz without Shiny, recordings of talks from one of the biggest R events of the years, and some great materials on Quarto. Let’s dive in! Creating interactive visualizations with {ggiraph} (with or without Shiny) When people think interactive data viz in R, they often think Shiny. While Shiny can be great in certain cases, it’s not always necessary to make your charts interactive. In...

Let the {styler} package help you reformat your code

The tidyverse style guide offers many helpful suggestions for how to write your code. Of course, the style guide is very opinionated as all style guides usually are. Still, in our R courses we try to adhere to the tidyverse style guide as much as possible because we believe that this makes for pretty legible code. Now, even as seasoned tidyverse users, we sometimes mess up our code structure. This is just a normal thing that happenes to everyone. So to save some time trying to fix the...

What's New in R: March 25, 2024

Welcome to this week’s edition of ​What’s New in R ​! This week, we’re featuring a book that collects R books (so meta), a set of workshop materials on making your own R package, and a presentation of making. Your code more beautiful. Let’s dive in! Big Book of R at 400 Read More → R package workshop There are many benefits to making your own R package. But making a package is complicated. There are some great resources out there: the R Packages book by Hadley Wickham and Jenny Bryan is...

R for the Rest of Us Podcast Episode 13: Ahmadou Dicko

In this episode, I talk with Ahmadou Dicko, a statistician based in Senegal working with the United Nations High Commissioner for Refugees (UNHCR). Ahmadou shares insights on utilizing data-driven approaches to address development obstacles, especially within humanitarian settings. He explores the innovative packages and strategies developed by his team using R for data management, analysis, and communication. Among these innovations is robotoolbox , an extensive R package designed for...

What's New in R: March 18, 2024

Welcome to this week’s edition of ​What’s New in R ​! This week, we’re featuring a tutorial on making beautiful maps to print, a book on the fundamentals of telling stories with data, and examples of how to automate data quality checks. Let’s dive in! Making Circular Maps in ggplot I love when people use R to make things in real life. That’s exactly what Meghan Harris did last year, when she created a map for her best friend’s wedding. In this blog post, she goes step-by-step through the...

How to know if your data is tidy

One of the most frequent questions we get when we teach R is “How do I know if my data is in a tidy format?” Rightfully so. Tidy data is a powerful concept and I remember asking myself the exact same questions when I first learned about tidy data. So to help you answer this question, let me give you an answer to this question that eventually helped me and made my life easier. But beware: You might find the answer a little bit unintuitive at first. Forget about tidy data Yup, that’s right....

What's New in R: March 11, 2024

Welcome to this week’s edition of ​What’s New in R ​! This week, we’re featuring a new version of Quarto, a new-to-me package for geocoding, and a package to ensure your plots are accessible to all. Let’s dive in! Quarto 1.4 Quarto 1.4 is out. The headline new features are dashboards and PDFs made with the new typst format. If you’ve used the {flexdashboard} package to make dashboards in R Markdown, you’ve probably been waiting for the equivalent functionality in Quarto. It’s now here! And if...

What's New in R: March 4, 2024

Welcome to this week’s edition of ​What’s New in R ​! This week, we’re featuring posts on the complete() function from the {tidyr} package, new features in the table-making {gt} package, and a tutorial on adding logos to images. Let’s dive in! You tidyr::complete() me Imagine you’ve got a dataset that looks like this: As a human being (you are human, correct?), you can look at this and know that this means the dog got 0 walks on Thursday and the cat got 0 walks on Wednesday. But computers are...

Use tidyselect helpers to grab the right data

Tidyselect helpers are neat little helper function that help you, well, select the right data. This can make your life easier when you want to either grab many different columns or even transform many columns using across() . For example, have you ever found yourself typing out repetitive calculations like this: Here, we converted all the measurements that are given in millimeters (mm) to centimeters (cm). To do so, we had to divide the mm numbers by 10 (yay, metric system 🥳) and select all...