Skip to content

Commit

Permalink
Fix bug in INLABRU for custom forumla
Browse files Browse the repository at this point in the history
  • Loading branch information
mhesselbarth committed Nov 14, 2024
1 parent 6875ffc commit c62df18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/train.R
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ methods::setMethod(
}

# remove unused predictors
pred_tmp <- unique(c(sapply(model$biodiversity, function(i) i$predictors_names)))
pred_tmp <- unique(unlist(lapply(model$biodiversity, function(i) i$predictors_names), use.names = FALSE))
pred_prs <- model$predictors_object$get_names()
model$predictors_names <- pred_tmp
model$predictors_types <- model$predictors_types[model$predictors_type$predictors %in% pred_tmp, ]
Expand Down Expand Up @@ -957,7 +957,7 @@ methods::setMethod(
}

# remove unused predictors
pred_tmp <- unique(c(sapply(model$biodiversity, function(i) i$predictors_names)))
pred_tmp <- unique(unlist(lapply(model$biodiversity, function(i) i$predictors_names), use.names = FALSE))
pred_prs <- model$predictors_object$get_names()
model$predictors_names <- pred_tmp
model$predictors_types <- model$predictors_types[model$predictors_type$predictors %in% pred_tmp, ]
Expand Down

0 comments on commit c62df18

Please sign in to comment.