Hey i'm trying to rename some columsn by adding "Last_" with the new version of dplyr but I keep getting this error
Error: `across()` must only be used inside dplyr verbs.
this is my code
data %>% rename(across(everything(), ~paste0("Last_", .)))
dplyr version: v1.0.2
We can use
rename_with
instead ofrename
Reproducible example
According to
?rename
and in
?across
The description says its use within
mutate/summarise
(andtransmute
?), and no indication of usage with any other functions i.e. it would fail withselect