Skip to content

Commit

Permalink
use model frame for computing terms contribution
Browse files Browse the repository at this point in the history
  • Loading branch information
larmarange committed Dec 27, 2024
1 parent 12e353f commit 155fff6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R/model_compute_terms_contributions.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ model_compute_terms_contributions.default <- function(model) {
} # stop

# continuous variables converted to 1 to force positive values
d <- model |> purrr::pluck("data")
if (is.null(d)) d <- model |> model_get_model_frame()
d <- model |> model_get_model_frame()

if (is.null(d)) {
return(NULL)
Expand Down

0 comments on commit 155fff6

Please sign in to comment.