Skip to content
R for the Rest of Us Logo

R for the Rest of Us Blog

Use snippets in RStudio to repeat common patterns

Sometimes it’s the little things that can give you a productivity speed boost. That’s why we’ve already looked into great RStudio keyboard shortcuts that can make your programming life easier. In today’s blog post, we want to highlight another one of RStudio’s excellent features, namely reusuable code snippets. For example, check out this function: Here, I’ve created a simple function that adds two vectors. There are two ways to create this: Write this all out (including all of the special...

What’s New in R: April 22, 2024

Welcome to this week’s edition of ​What’s New in R ​! This week, we’re featuring a tutorial on wrapping text labels, a comprehensive look at joins, and an analysis of toast (yes, really). Let’s dive in! How to wrap long strip labels in facet_wrap If you’ve ever made a facetted plot in ggplot and found that the title of each plot (fancy name: strip text) is too long and gets cut off, this blog post from the website Data Viz with Python and R is for you! It shows how to use the labeller...

R for the Rest of Us Podcast Episode 14: Will Landau

In this episode, I’m joined by Will Landau, a statistician and software developer currently working with Eli Lilly and Company. Will specializes in Bayesian methods, high-performance computing, and reproducible workflows. He is the creator of the {targets} R package, a pipeline tool for reproducible computation in statistics and data science. The package became part of ROpenSci in early 2021. Will talks about his journey into R and using it for open source projects. He gives a detailed...

What’s New in R: April 15, 2024

Welcome to this week’s edition of ​What’s New in R ​! This week, we’re featuring a video on how a professional baseball team uses R, a package to convert form Google Docs to Quarto, and an analysis that shows R’s continued popularity. Let’s dive in! How Major League Teams use R to Analyze Baseball Data If you’ve ever wanted to get a peek behind the curtain and see how an organization uses R, this is a great video! Keith Woolner, principal data scientist for the Cleveland Guardians, shows how...

How to separate a single column into multiple ones

Every now and then it happens that a lot of information is crunched into one column. For example, take a look at this data about board games from tidyTuesday . Notice how the column of boardgamecategory contains a lot of labels. These labels represent all of the different categories a board game can fall into. Now, if we wanted to visualize the most popular board game categories, we might make a chart like this: But the question becomes: How do we count the board game categories if all of...

What's New in R: April 8, 2024

Welcome to this week’s edition of ​What’s New in R ​! This week, we’re featuring a guide to integrating Tableau and Quarto, an interview with Camila Saez, and tips on making attractive PDFs from Quarto. Let’s dive in! R to Tableau, then show it in Quarto One of the benefits of Quarto is that it can work with many different tools. If you’ve ever wanted to embed a Tableau dashboard into your Quarto, you can! This tutorial by Gregers Kjerulf Dubrow shows how he uses R to source and clean data,...

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