Skip to content

Commit

Permalink
make robust
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Feb 25, 2025
1 parent 4abeb85 commit e615c4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/get_datagrid.R
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ get_datagrid.default <- function(x,
w <- insight::find_weights(x)
if (!is.null(w)) {
if (include_weights) {
vm[w] <- mean(get_weights(x, remove_na = TRUE, null_as_ones = TRUE))
vm[w] <- .safe(mean(get_weights(x, remove_na = TRUE, null_as_ones = TRUE)), 1)
} else if (!inherits(x, "brmsfit")) {
# for lme, can't be NA
if (inherits(x, c("lme", "gls"))) {
Expand Down

0 comments on commit e615c4b

Please sign in to comment.