traitecoevo / austraits.build

Source for AusTraits
Other
16 stars 2 forks source link

Fix warnings #722

Closed Becca-90 closed 1 year ago

Becca-90 commented 1 year ago

There have been some changes to syntax in some dplyr functions. Specifically, use of .data in tidyselect expressions was deprecated in tidyselect 1.2.0. It is also necessary in some circumstances to use either the all_of() or any_of() function with the select() function

See:

  1. https://cran.r-project.org/web/packages/tidyselect/news/news.html
  2. https://tidyselect.r-lib.org/reference/faq-external-vector.html

There also seems to be a problem using .data in the rename() function, changing this removed about 20 more warnings.

All select syntax has now been updated in the austraits/R folder of functions, most warnings have now gone but there are still 4 referring to line 140 of test-xamples.R that all say:

data %>% select(v)

should be changed to either:

data %>% select(all_of(v))

or

data %>% select(any_of(v))

Line 140 in test-xamples.R uses the function test_build_dataset

dfalster commented 1 year ago

Moved to #739