elbersb / tidylog

Tidylog provides feedback about dplyr and tidyr operations. It provides wrapper functions for the most common functions, such as filter, mutate, select, and group_by, and provides detailed output for joins.
Other
585 stars 25 forks source link

Substitute scoped functions #68

Open raffaem opened 2 months ago

raffaem commented 2 months ago

Thanks for this uuseful package!

Don't you think we should replace scoped functions in the examples?

For instance:

# dplyr < 1.0
d <- filter_at(mtcars, vars(starts_with("d")), any_vars((. %% 2) == 0))

# 1.0 <= dplyr < 1.0.8
d <- filter(mtcars, rowSums(across(starts_with("d"), ~ .x %% 2 == 0))>0)

# dplyr >= 1.0.8
d <- filter(mtcars, if_any(starts_with("d"), ~ .x %% 2 == 0))
elbersb commented 2 months ago

sure, feel free to send a PR :)