Post-processing no longer prints redundant labels - #663
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Two moderate post_process parsing issues remain unresolved.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This pull request removes redundant grouping-variable labels from post-processed contrast parameters.
Changes:
- Updates post-processing label generation.
- Adds regression coverage.
- Updates NEWS and development version.
Review findings:
R/get_marginalmeans.R: Two moderate issues remain with character-string and functionpost_processparsing (1 and 2 votes).NEWS.md: Nit regarding a missing space (3 votes).
File summaries
| File | Summary |
|---|---|
tests/testthat/test-estimate_contrasts.R |
Adds regression coverage for expected parameter labels. |
R/get_marginalmeans.R |
Adjusts post-processing label generation; parsing issues remain unresolved. |
NEWS.md |
Documents the output change. |
DESCRIPTION |
Bumps the development version. |
Review details
Suppressed comments (1)
R/get_marginalmeans.R:410
post_processis documented as accepting character strings, butsafe_deparse()quotes a character input. Withpost_process = "pairwise | e42dep", the extracted group becomese42dep\", soall.vars()finds no matching column and the redundant group labels remain; parse character inputs directly (or normalize them before deparsing).
strsplit(insight::safe_deparse(post_process), "|", fixed = TRUE),
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
This code
used to include levels from the grouping-variable
e42depin theParameterscolumn, where the levels of comparisons were saved (i.e. the levels ofe42depappeared in two columns). This redundant information is now removed, to clean the output.