inbo / n2khab

R package with preprocessing functions and standard reference data for Flemish Natura 2000 (N2K) habitat (HAB) analyses
https://inbo.github.io/n2khab
GNU General Public License v3.0
2 stars 1 forks source link

.data in tidyselect expressions is deprecated #179

Open florisvdh opened 8 months ago

florisvdh commented 8 months ago

See https://tidyselect.r-lib.org/news/index.html#lifecycle-changes-1-2-0

The .data$x in tidyselect expressions should be replaced with quoted variable names "x", as shown by the warnings.

florisvdh commented 1 month ago

There are about 364 occurrences of .data$ in the codebase.

Warnings look like below, but they are only generated when editing (debugging) {n2khab} functions, not when running them:

Use of .data in tidyselect expressions was deprecated in tidyselect 1.2.0.
ℹ Please use `"NAAM"` instead of `.data$NAAM`
This warning is displayed once every 8 hours.
Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.
florisvdh commented 1 month ago

When converting, we also need to distinguish tidy selection from data masking; see https://r4ds.hadley.nz/functions#data-masking-vs.-tidy-selection.