1
0
mirror of https://github.com/msberends/AMR.git synced 2025-09-06 04:09:39 +02:00

support for dplyr 1.1.0

This commit is contained in:
2023-02-15 17:02:10 +01:00
parent fe41fc2e35
commit 6016547f1f
7 changed files with 33 additions and 28 deletions

View File

@@ -138,7 +138,7 @@ key_antimicrobials <- function(x = NULL,
only_sir_columns = FALSE,
...) {
if (is_null_or_grouped_tbl(x)) {
# when `x` is left blank, auto determine it (get_current_data() also contains dplyr::cur_data_all())
# when `x` is left blank, auto determine it (get_current_data() searches underlying data within call)
# is also fix for using a grouped df as input (a dot as first argument)
x <- tryCatch(get_current_data(arg_name = "x", call = -2), error = function(e) x)
}
@@ -250,7 +250,7 @@ all_antimicrobials <- function(x = NULL,
only_sir_columns = FALSE,
...) {
if (is_null_or_grouped_tbl(x)) {
# when `x` is left blank, auto determine it (get_current_data() also contains dplyr::cur_data_all())
# when `x` is left blank, auto determine it (get_current_data() searches underlying data within call)
# is also fix for using a grouped df as input (a dot as first argument)
x <- tryCatch(get_current_data(arg_name = "x", call = -2), error = function(e) x)
}