Skip to content

Commit

Permalink
fix: use any_of instead of all_of to avoid error when variables are n…
Browse files Browse the repository at this point in the history
…ot used #619
  • Loading branch information
laresbernardo committed May 16, 2023
1 parent c176c95 commit 3c43d74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/R/inputs.R
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ robyn_inputs <- function(dt_input = NULL,

# Check for no-variance columns (after filtering modeling window)
dt_mod_model_window <- InputCollect$dt_mod %>%
select(-all_of(InputCollect$unused_vars)) %>%
select(-any_of(InputCollect$unused_vars)) %>%
filter(.data$ds >= InputCollect$window_start,
.data$ds <= InputCollect$window_end)
check_novar(dt_mod_model_window, InputCollect)
Expand Down Expand Up @@ -571,7 +571,7 @@ robyn_engineering <- function(x, quiet = FALSE, ...) {
if (!quiet) message(">> Running feature engineering...")
InputCollect <- x
check_InputCollect(InputCollect)
dt_input <- select(InputCollect$dt_input, -all_of(InputCollect$unused_vars))
dt_input <- select(InputCollect$dt_input, -any_of(InputCollect$unused_vars))
paid_media_vars <- InputCollect$paid_media_vars
paid_media_spends <- InputCollect$paid_media_spends
factor_vars <- InputCollect$factor_vars
Expand Down

0 comments on commit 3c43d74

Please sign in to comment.