Skip to content

Commit

Permalink
find_predictors(verbose=FALSE)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Dec 11, 2024
1 parent 393e32e commit efe1ce3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/get_model_matrix_attribute.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ get_model_matrix_attribute <- function(model, newdata = NULL) {
}

# subset variables for listwise deletion
vars <- unlist(insight::find_predictors(model), use.names = FALSE)
vars <- unlist(insight::find_predictors(model, verbose = FALSE), use.names = FALSE)
vars <- c(vars, unlist(insight::find_response(model), use.names = FALSE))
vars <- intersect(vars, colnames(newdata))

Expand Down
2 changes: 1 addition & 1 deletion R/sanitize_variables.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sanitize_variables <- function(variables,
if (is.null(variables)) {
# mhurdle names the variables weirdly
if (inherits(model, "mhurdle")) {
predictors <- insight::find_predictors(model, flatten = TRUE)
predictors <- insight::find_predictors(model, flatten = TRUE, verbose = FALSE)
predictors <- list(conditional = predictors)
} else {
predictors <- insight::find_variables(model)
Expand Down

0 comments on commit efe1ce3

Please sign in to comment.