mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 10:31:53 +02:00
(v1.7.1.9032) dplyr grouping fix on windows?
This commit is contained in:
@ -736,7 +736,7 @@ get_current_data <- function(arg_name, call) {
|
||||
if (!is.null(cur_data_all)) {
|
||||
out <- tryCatch(cur_data_all(), error = function(e) NULL)
|
||||
if (is.data.frame(out)) {
|
||||
messsage("==> RETURNING cur_data_all()")
|
||||
message("==> RETURNING cur_data_all()")
|
||||
return(structure(out, type = "dplyr_cur_data_all"))
|
||||
}
|
||||
}
|
||||
@ -749,17 +749,17 @@ get_current_data <- function(arg_name, call) {
|
||||
if (!is.null(env$`.data`) && is.data.frame(env$`.data`)) {
|
||||
# an element `.data` will be in the environment when using `dplyr::select()`
|
||||
# (but not when using `dplyr::filter()`, `dplyr::mutate()` or `dplyr::summarise()`)
|
||||
messsage("==> RETURNING dplyr_selector")
|
||||
message("==> RETURNING dplyr_selector")
|
||||
return(structure(env$`.data`, type = "dplyr_selector"))
|
||||
|
||||
} else if (!is.null(env$xx) && is.data.frame(env$xx)) {
|
||||
# an element `xx` will be in the environment for rows + cols, e.g. `example_isolates[c(1:3), carbapenems()]`
|
||||
messsage("==> RETURNING base_R 1")
|
||||
message("==> RETURNING base_R 1")
|
||||
return(structure(env$xx, type = "base_R"))
|
||||
|
||||
} else if (!is.null(env$x) && is.data.frame(env$x)) {
|
||||
# an element `x` will be in the environment for only cols, e.g. `example_isolates[, carbapenems()]`
|
||||
messsage("==> RETURNING base_R 2")
|
||||
message("==> RETURNING base_R 2")
|
||||
return(structure(env$x, type = "base_R"))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user