We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
deharmonize()
1 parent 3cb0914 commit 0127f2dCopy full SHA for 0127f2d
R/translate.R
@@ -138,9 +138,17 @@ get_args <- function(model, engine) {
138
139
# to replace harmonize
140
deharmonize <- function(args, key) {
141
- if (length(args) == 0)
+ if (length(args) == 0) {
142
return(args)
143
- parsn <- tibble(parsnip = names(args), order = seq_along(args))
+ }
144
+
145
+ if (nrow(key) == 0) {
146
+ return(args[integer(0)])
147
148
149
+ parsn <- list(parsnip = names(args), order = seq_along(args))
150
+ parsn <- tibble::new_tibble(parsn, nrow = length(args))
151
152
merged <-
153
dplyr::left_join(parsn, key, by = "parsnip") %>%
154
dplyr::arrange(order)
0 commit comments