`across()` deprecated as of dplyr 1.1.0

I have a question about just one line of the code without any data involved.
I have this error:

Caused by warning:
! The `...` argument of `across()` is deprecated as of dplyr 1.1.0.
Supply arguments directly to `.fns` through an anonymous function instead.

  # Previously
  across(a:b, mean, na.rm = TRUE)

  # Now
  across(a:b, \(x) mean(x, na.rm = TRUE))

applied to this line of my code

mutate(across(contains("Date"), as.Date, format = "%d/%m/%Y"))

but I don't know how to amend it. Can you help please?


mutate(across(contains("Date"), \(x) as.Date(x,  format = "%d/%m/%Y")))

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.