Repository navigation
Update easybgm to allow for the most recent bgms version and small bug fixes. - #133
Merged
KarolineHuth merged 14 commits intoJul 9, 2026
Merged
Conversation
…ects
The class(fit) <- 'bgms' and class(fit) <- c('bgmCompare') lines in
bgm_extract.package_bgms() and bgm_extract.package_bgms_compare()
overwrite the S7 class vector c('bgms', 'S7_object') with a plain
string. This destroys the S7 metadata and makes all property access
fail when bgms >= 0.2.0 returns S7 objects.
The lines are also unnecessary for S3: the object already carries the
correct class from bgm() / bgmCompare(), or from fit$packagefit which
preserves whatever class bgms assigned.
…e-class-reassignment fix: remove redundant class(fit) reassignment that breaks S7 bgms obj…
Merge branch 'main' into update_easybgm # Conflicts: # R/easybgm.R # R/easybgm_compare.R # R/functions.bgms.R # R/functions.bgmscompare.R # R/plottingfunctions.bgmCompare.R # R/summary.easybgm.R # man/easybgm.Rd # man/easybgm_compare.Rd # tests/testthat/Rplots.pdf
…w true S7 objects, includes prior classes).
Merge branch 'main' into update_easybgm # Conflicts: # tests/testthat/Rplots.pdf # tests/testthat/test-easybgm.R
bgms 0.2.0.0 returns fit objects as S7 (class c("bgms", "S7_object")).
Two easybgm extraction paths broke against it:
- bgm_extract.package_bgms overwrote the fit class with plain "bgms",
stripping "S7_object" and breaking the $.bgms / [[.bgms accessors
(they dispatch on inherits(x, "S7_object") then use S7::prop()).
Guard the assignment with !inherits(fit, "bgms"); still backward
compatible with pre-S7 (list-based) bgms.
- bgm_extract.package_bgms_compare read the Bernoulli difference prior
via a broken guard and a non-existent args field, silently falling
back to 0.5. Read it directly from args$inclusion_probability instead.
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.
[] updates easybgm to allow for the most recent bgms version 0.2.0
[] for the most recent bgms, changes default package settings to bgms for all types of data
[] adapts compatibility for prior specification in bgms version 0.2.0