Skip to content

Fix subset with glm #50

Merged
malcolmbarrett merged 5 commits into
mainfrom
fix-subset
May 6, 2026
Merged

Fix subset with glm #50
malcolmbarrett merged 5 commits into
mainfrom
fix-subset

Conversation

@malcolmbarrett

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to fix psw behavior when weighted GLMs are profiled via broom::tidy(..., conf.int = TRUE), by changing how psw vectors subset and compare inside downstream glm code paths.

Changes:

  • Adds a new [.psw method and explicit comparison-operator methods for psw.
  • Adds/updates tests around subsetting, warning behavior, and WeightIt comparisons.
  • Registers the new S3 methods, adds broom to Suggests, and documents the change in NEWS.md.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
R/psw.R Implements the new psw subsetting and comparison behavior.
tests/testthat/test-bracket-psw.R Adds targeted tests for [ behavior and the broom::tidy() regression.
tests/testthat/test-coercion-warnings.R Updates warning expectations for psw comparisons.
tests/testthat/test-weights.R Relaxes WeightIt equality checks to ignore name attributes.
tests/testthat/test-weights-categorical-comparison.R Applies the same name-insensitive comparison updates for categorical-weight tests.
tests/testthat/_snaps/coercion-warnings.md Removes obsolete warning snapshots after the comparison behavior change.
NAMESPACE Registers the new psw S3 operator and [ methods.
DESCRIPTION Adds broom to Suggests for the new regression test.
NEWS.md Records the intended fix and behavior changes for the development version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/psw.R
Comment thread R/psw.R
Comment thread NEWS.md
Comment thread R/psw.R

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/testthat/test-bracket-psw.R
Comment thread R/psw.R
@malcolmbarrett malcolmbarrett merged commit 1bd5e02 into main May 6, 2026
7 checks passed
@malcolmbarrett malcolmbarrett deleted the fix-subset branch May 6, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants