itsMeInMiami
itsMeInMiami

Reputation: 2669

Any strategies for dealing with superseded and depreciated functions in R (tidyverse)?

Is there a utility/function/package to check to see if an R script is using any superseded or depreciated functions?

I ask because I just noticed that one of my packages uses dplyr::mutate_all() which I know is superseded by across(). I checked my package's files for "mutate_" and rewrote those function calls. So that batch of depreciated functions are fixed but I don't know how to check for all superseded and/or depreciated functions.

Does anybody have a strategy for dealing with this issue?

Upvotes: 0

Views: 439

Answers (1)

akrun
akrun

Reputation: 887028

There is lifecycle package which can show the superseded/deprecated functions

library(lifecycle)
pkg_lifecycle_statuses("dplyr")

-output

  package                fun    lifecycle
4     dplyr       add_rownames   deprecated
5     dplyr          all_equal  questioning
6     dplyr           all_vars   superseded
7     dplyr           any_vars   superseded
10    dplyr        arrange_all   superseded
11    dplyr         arrange_at   superseded
12    dplyr         arrange_if   superseded
...

Upvotes: 5

Related Questions