I'm going to need Hadley Wickham to make up his mind.

  • early 00s - 2020s: recoding with dplyr is annoying; just use car::recode()
  • 2020s: dplyr::recode() happens, breaking bazillions of scripts, functions, and analyses
  • 2024: dplyr::recode() is deprecated; use case_match or case_when instead; it's way better except that you I have no idea why it was better, I just had to learn a new syntax form. I think many people just went back to car::recode(), at this point
  • 2026: Now apparently case_match() is deprecated, and we're supposed to use a new function: recode_values(). I'll go learn about it when I have time.

Can we please just let this one stick around a few years? This isn't some esoteric, rare function; this is every day. All the time. Every time this breaks, it costs me hours of my life and comes back to cost me more hours in future years. as older, now-broken code refuses to work when I want to use it, and I spend an hour debugging before I remember.

Edit: I actually think Hadley Wickham is phenomenal and has probably (in my limited view) done more for R than any other1 single person in the past 20 years. I also know that something like tidyverse must evolve. My occasional gripes about the cycle of new functions, and my frequent frustration at just not understanding things quickly enough, are very small compared to my gratitude that the tidyverse is what it is.

1 Sorry, Yves Rosseel2 ... I'm a huge fan, but it's just a numbers game, you know? Laaan is my favorite package!

2 Huh. Spell check in Vivaldi helped me spell Rosseel correctly.

#rstats #complaints #deprecated #tidyverse

@guyjantic This is peak CRAN.
@noodle
No no no no no. This is the opposite of CRAN even. Peak CRAN is drop=TRUE for compatibility with S.
@guyjantic

@guyjantic
Or replace_values(), which is like recode_values() but then different.

car::recode() it is.

@guyjantic I always thought that if you wanted to have stability in your code, use base R. Or you go with the flavour of the day, but then you'll also have to adapt. At least that's how I understood tidyverse...
@druedin Yeah, this is how to do it, I think, but I'm inconsistent, so I'll probably just do inconsistent adapting while complaining.

@guyjantic Not to start any flame wars, but isn’t recode() only superseded? AFAIK doesn’t raise a warning in dplyr 1.2. Similarly case_match(), despite raising a warning, continues to work and likely will do for the next 5 years.

FWIW, I think the tidyverse lifecycle system works pretty well and has helped birth an ecosystem with an incredibly well designed API. With old projects I just pin package versions and forget about them.

@_wurli Your entirely reasonable response to my somewhat histrionic complaint is... well, it's OK, I guess. Takes some of the air out of my whininess :)

I honestly don't know about recode() being superseded. I can't remember the warnings, but I switched to case_match() due to lots of warnings over the past year or so. I also frequently have car and dplyr (well, tidyverse) loaded in the session, so I've gone through several rounds of frustration when I realize one or the other is trying to run their recode() and getting confused. That's the function, actually, that taught me how to use the double colon :: many years ago.

@guyjantic Welcome to the tidyverse? 🤷‍♂️
@guyjantic Having a long term reliable set of functions that are backwards compatible is a great design feature of a package.
@guyjantic You're still writing code *manually*? Just use the new RStudio-integrated AI! Only $20 per month and it will know all about tidyverse changes *before you do*!