Skip to content

Commit

Permalink
fix issue #1710
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-buerkner committed Nov 26, 2024
1 parent cbd7a26 commit 9a711d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Package: brms
Encoding: UTF-8
Type: Package
Title: Bayesian Regression Models using 'Stan'
Version: 2.22.6
Date: 2024-11-14
Version: 2.22.7
Date: 2024-11-26
Authors@R:
c(person("Paul-Christian", "Bürkner", email = "[email protected]",
role = c("aut", "cre")),
Expand Down
4 changes: 3 additions & 1 deletion R/bayes_R2.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ bayes_R2.brmsfit <- function(object, resp = NULL, summary = TRUE,
# check for precomputed values
R2 <- get_criterion(object, "bayes_R2")
has_stored <- is.matrix(R2)
use_stored <- as.logical(length(list(...)))
further_arg_names <- c("resp")
use_stored <- !length(list(...)) &&
!any(further_arg_names %in% names(match.call()))
if (has_stored && !use_stored) {
message("Recomputing 'bayes_R2'")
}
Expand Down

0 comments on commit 9a711d2

Please sign in to comment.