Repository navigation
Pass response to bayestestR::bayesian_as_frequentist() in check_model() - #984
Merged
strengejacke merged 3 commits intoOct 18, 2026
Merged
Conversation
…that argument bayestestR renamed `resp` to `response` (easystats/bayestestR#790). Passing `resp` still worked by partial matching but warned under options(warnPartialMatchArgs = TRUE). Older bayestestR versions still get `resp`.
Multivariate brms support is new in this devel cycle, so no released version had the partial-match warning.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
All reviewed changes are covered by tests and no blocking issues were identified.
No open issues 🎉
What changed in this PR
Updates check_model() to support both old and new bayestestR response argument names without partial-match warnings.
Changes:
- Selects
responseor legacyrespbased on package support. - Adds compatibility and regression tests.
- Bumps the development version.
| File | Description |
|---|---|
tests/testthat/test-check_model.R |
Tests argument compatibility and warning-free conversion. |
R/check_model.R |
Selects the compatible response argument. |
DESCRIPTION |
Bumps the package version. |
Review effort: Lite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bayestestR renamed the
respargument ofbayesian_as_frequentist()toresponsein easystats/bayestestR#790 (version 0.20.0.1), with no alias.check_model()still passedresp = respfor multivariate brms models. That call works only by partial matching, so withoptions(warnPartialMatchArgs = TRUE)it warns "partial argument match of 'resp' to 'response'".What changes
check_model()passesresponse = respwhenbayestestR::bayesian_as_frequentist()has aresponseargument, andresp = respotherwise. CRAN's bayestestR 0.20.0 still hasresp, and Prepare CRAN release #980 lowers the minimum to 0.19.0, so this PR does not change the bayestestR minimum orRemotes.Tests
responseargument and a mock with arespargument each receive their own argument name and the value. The names are read withsys.call(), so a partial match ofresptoresponsemakes the test fail. The existingfunction(...)mock now also checks that it gets noresponse.brms_mv_1underwarnPartialMatchArgs = TRUEgives the frequentist panels and no partial-match warning. The test is skipped when the installed bayestestR has noresponseargument.On main, the
responsemock and the real-conversion test fail. With bayestestR 0.20.0.1 installed locally, the full suite gives no failure, andR CMD checkgives no error or warning.