mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 17:21:49 +02:00
fix for scoped dplyr verbs
This commit is contained in:
@ -882,9 +882,9 @@ get_current_data <- function(arg_name, call) {
|
||||
return(env$x)
|
||||
}
|
||||
|
||||
} else if (!is.null(names(env)) && all(c(".tbl", ".vars", ".env") %in% names(env), na.rm = TRUE) && valid_df(env$`.tbl`)) {
|
||||
# an element `.tbl` will be in the environment when using `dplyr::vars()`
|
||||
# (e.g. in `dplyr::summarise_at()` or `dplyr::mutate_at()`)
|
||||
} else if (!is.null(names(env)) && all(c(".tbl", ".vars", ".cols") %in% names(env), na.rm = TRUE) && valid_df(env$`.tbl`)) {
|
||||
# an element `.tbl` will be in the environment when using scoped dplyr variants, with or without `dplyr::vars()`
|
||||
# (e.g. `dplyr::summarise_at()` or `dplyr::mutate_at()`)
|
||||
return(env$`.tbl`)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user