Teun van den Brand

@teunbrand.bsky.social

GitHub: https://github.com/teunbrand

dplyr 1.2.0 is out now and we are SO excited! - `filter_out()` for dropping rows - `recode_values()`, `replace_values()`, and `replace_when()` that join `case_when()` as a complete family of recoding/replacing tools These are huge quality of life wins for #rstats! tidyverse.org/blog/2026/02...

dplyr 1.2.0

dplyr 1.2.0 fills in some important gaps in dplyr's API: we've added a new complement to `filter()` focused on dropping rows, and we've expanded the `case_when()` family with three new recoding and re...

tidyverse.org

# pretty slick l <- c(mpg = "Miles per gallon", wt = "Weight (1,000 lbs)", `mpg/2` = "yes this works") ggplot(mtcars, aes(mpg, wt)) + labs(dictionary = l) ggplot(mtcars, aes(wt, mpg)) + labs(dictionary = l) ggplot(mtcars, aes(wt, mpg/2)) + labs(dictionary = l)

You can specify relative position in ggplot with I(x) I(y). E.g. annotate("text", x = I(.5), y = I(.5), label = "hello!") will place the text in the middle of the plot. This, combined with alignment arguments is like 87% of the magic for me.

I ignored the strip.clip argument in #ggplot2 for way too long 😲 Combined with a small negative margin tweak, you can place facet labels inside each panel. A tiny trick that makes small multiples feel so much cleaner. 🔵 no manual coordinates 🔵 inherits theme styling 🔵 scales nicely when resizing

Side-by-side comparison of two multi-panel bubble charts faceted by world region. The left column shows the default facet labels placed above each panel (“Africa”, “Americas”, “Asia”, “Europe”, “Oceania”). The right column shows the same charts, but the facet labels are moved inside each panel at the top-left using a negative margin. In the center, there is a title reading “Want to place your facet labels inside each panel?” with an arrow pointing right, followed by a short ggplot2 theme code snippet demonstrating how to move strip text inside the panel.

testthat 3.3.0 out now! This is a massive release with tons of improvements including better failure messages, new expectations, improved snapshotting, new vignettes, and much much more: tidyverse.org/blog/2025/11... Post includes some thoughts on developing an #rstats package with Claude Code.

testthat 3.3.0

testthat 3.3.0 brings improved expectations with better error messages, new expectations for common testing patterns, and lifecycle changes including the removal of `local_mock()` and `with_mock()`. I...

tidyverse.org

I wrote a lil post on the amazing work that @ginareynolds.bsky.social does championing ggplot2 extension developers and teaching others to build their own! The post features the Scrollytelling Quarto extension and the group's cute #RStats hex 🐱: rworks.dev/posts/ggplot...

An Introduction to Writing Your Own ggplot2 Geoms – R Works

The ggextenders club provides inspiration and resources for those venturing into the exciting world of creating custom ggplot2 extensions.

rworks.dev

I'm excited to share a new version of the Air formatter for #rstats, with support for tabular formatting! Super useful with `tibble::tribble()` calls or `data.table::fcase()`. It's currently experimental as we're looking to get feedback on the feature, so please let us know what you think.