📢 Recently I’ve rewritten an old #RStats script in which I recode and rename multiple columns across several datasets based on a data dictionary. I came up with a pretty slick 😎 dplyr workflow which I've detailed in my latest blog post 📰.

Any feedback welcome!

https://tim-tiefenbach.de/post/2023-recode-columns/

Using a Data Dictionary to Recode Columns with dplyr | Tim Tiefenbach

This blog post provides an in-depth tutorial on using dplyr to recode and rename multiple columns across several datasets according to a data dictionary.

Tim Tiefenbach

I’m curious if there are any similar slick base R or data.table solutions for this task (especially when recoding several datasets in on go).

My pre-dplyr 1.0 way to do it was far more complicated and is based on this SO question and answer:
https://stackoverflow.com/questions/56636417/bunch-recoding-of-variables-in-the-tidyverse-functional-meta-programing

bunch recoding of variables in the tidyverse (functional / meta-programing)

I want to recode a bunch of variables with as few function calls as possible. I have one data.frame where I want to recode a number of variables. I create a named list of all variable names and the

Stack Overflow