-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #115 - filter duplicate records for indicator_native_range_year #116
Conversation
@damianooldoni Is there anything I can do to fix the checks? |
Thanks @mvarewyck. Unfortunately not. The failures are due to rgeos and rgdal which are used by sp. Extract from the log of one of the failing actions:
We know this anomaly and @soriadelva is working on this in #111 I will test your changes locally and then I will add my review. |
The column doesn't contain unique values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mvarewyck. nice work.
I have just pushed little changes.
Notice I had to add all_of()
in a dplyr::rename()
to avoid a warning while running the tests of the function. Reason:
Warning (test-indicator_native_range_year.R:82:3): Test output type, class, slots and columns
Using an external vector in selections was deprecated in tidyselect 1.1.0.
ℹ Please use `all_of()` or `any_of()` instead.
# Was:
data %>% select(taxon_key_col)
# Now:
data %>% select(all_of(taxon_key_col))
See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
Backtrace:
▆
1. ├─trias::indicator_native_range_year(...) at test-indicator_native_range_year.R:82:3
2. │ └─... %>% dplyr::rename_at(dplyr::vars(taxon_key_col), ~"key") at trias/R/indicator_native_range_year.R:108:3
3. └─dplyr::rename_at(., dplyr::vars(taxon_key_col), ~"key")
4. └─dplyr:::tbl_at_vars(.tbl, .vars, .include_group_vars = TRUE)
5. └─tidyselect::vars_select(tibble_vars, !!!vars)
6. └─tidyselect:::eval_select_impl(...)
7. ├─tidyselect:::with_subscript_errors(...)
8. │ └─base::withCallingHandlers(...)
9. └─tidyselect:::vars_select_eval(...)
10. └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
11. └─tidyselect:::eval_c(expr, data_mask, context_mask)
12. └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
13. └─tidyselect:::walk_data_tree(new, data_mask, context_mask)
14. └─tidyselect:::eval_sym(expr, data_mask, context_mask)
Also wondering how to test the changes you applied to fix #115.
Good point, I have now included a test specific for this new feature. |
Thanks @mvarewyck to have added a test for it! I have just split a long line in a last commit (72dc97c). |
@damianooldoni Sure, good to go for me. Thanks for the quick follow up. |
I was merging while I realized that we didn't bump the version number 😄 |
No description provided.