mirror of
https://github.com/msberends/AMR.git
synced 2026-11-16 07:50:50 +01:00
(v3.0.1.9005) re-add tidymodels implementation
This commit is contained in:
1 parent
225c73f7e7
commit
151af21f38
16 files changed
+502
-61
No files matched your search
@@ -966,8 +966,13 @@ get_current_data <- function(arg_name, call) {
|
||||
# an element `.data` will be in the environment when using dplyr::select()
|
||||
return(env$`.data`)
|
||||
} else if (valid_df(env$training)) {
|
||||
# an element `training` will be in the environment when using some tidymodels functions such as `prep()`
|
||||
return(env$training)
|
||||
if (!is.null(env$x) && valid_df(env$x$template)) {
|
||||
# an element `x$template` will be in the environment when using some tidymodels functions such as `prep()`
|
||||
return(env$x$template)
|
||||
} else {
|
||||
# this is a fallback for some tidymodels functions such as `prep()`
|
||||
return(env$training)
|
||||
}
|
||||
} else if (valid_df(env$data)) {
|
||||
# an element `data` will be in the environment when using older dplyr versions, or some tidymodels functions such as `fit()`
|
||||
return(env$data)
|
||||
|
||||
Reference in new issue
Block a user