Skip to content

extend autoplot.sim_results()#462

Draft
d-morrison wants to merge 7 commits into
mainfrom
extend-sim-autoplot
Draft

extend autoplot.sim_results()#462
d-morrison wants to merge 7 commits into
mainfrom
extend-sim-autoplot

Conversation

@d-morrison

Copy link
Copy Markdown
Member

This pull request enhances the flexibility and usability of the autoplot.sim_results function by allowing users to customize which columns are mapped to the x-axis, group, and color aesthetics in plots. The documentation has been updated to reflect these new options.

Function enhancements:

  • Added new parameters to autoplot.sim_results: x_var, group_var, and color_var, allowing users to specify which columns in the input data frame are used for the x-axis, group, and color aesthetics in the plot.
  • Updated the function to use the values of x_var, group_var, and color_var when constructing the plot, replacing hardcoded column references.

Documentation updates:

  • Revised the Rd documentation for autoplot.sim_results to describe the new parameters and clarify the expected input format.

@d-morrison

Copy link
Copy Markdown
Member Author

@copilot update the changelog

Copilot AI commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

@d-morrison I've opened a new pull request, #463, to work on those changes. Once the pull request is ready, I'll request review from you.

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

📖 https://UCD-SERG.github.io/serocalculator/preview/pr462/
Preview documentation for this PR (at commit d287e13)

Update changelog for autoplot.sim_results() enhancements
@codecov

codecov Bot commented Nov 26, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Files with missing lines Coverage Δ
R/autoplot.sim_results.R 100.00% <100.00%> (ø)

github-actions Bot added a commit that referenced this pull request Jan 21, 2026

Copy link
Copy Markdown
Member Author

@claude this PR (extend-sim-autoplot) adds x_var/group_var/color_var arguments to autoplot.sim_results() and is 155 commits behind main. Please:

  • Merge origin/main and resolve conflicts (especially R/autoplot.sim_results.R, its man/ page, NEWS.md, DESCRIPTION).
  • Run devtools::document() to regenerate the .Rd/NAMESPACE, then lintr::lint_package(), spelling::spell_check_package(), and devtools::test(); add/refresh a test covering the new aesthetic-mapping arguments.
  • Make sure NEWS.md + version are consistent, confirm R CMD check is clean, and push.

I'll mark the PR ready for review once it's green.


Generated by Claude Code

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

👀 Picked up by workflow run #26922658294. R setup runs first; Claude itself responds after that.

…ith patchwork

- Add tests for new aesthetic-mapping arguments in autoplot.sim_results():
  test_that("x_var, group_var, color_var arguments work") with a vdiffr
  snapshot for swapped axes, and test_that("color_var defaults to group_var")
  checking the equality of explicit vs implicit color_var
- Replace ggpubr::ggarrange() with patchwork::wrap_plots() in
  autoplot.seroincidence.by() and graph_seroresponse_model_1(),
  replacing the ggpubr Imports entry with patchwork in DESCRIPTION;
  update return type in roxygen2 @return and switch stop() to cli::cli_abort()
- Bump version to 1.4.0.9015 (one ahead of main at 1.4.0.9014)
- Update NEWS.md with Dependencies section noting the patchwork migration
- Regenerate man/ pages and update autoplot.seroincidence.by snapshot for
  the new patchwork layout; add rlang to inst/WORDLIST

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

The commit is done. Here's a summary of what was accomplished:

Changes committed to extend-sim-autoplot:

  1. New tests (test-autoplot.sim_results.R): Added two new test cases covering the new parameters:

    • x_var, group_var, color_var arguments work — calls autoplot() with swapped axes and captures a vdiffr snapshot
    • color_var defaults to group_var — verifies implicit and explicit color_var produce identical plots
  2. ggpubr → patchwork migration (from origin/main):

    • R/autoplot.seroincidence.by.R: replaced ggpubr::ggarrange() with patchwork::wrap_plots(), stop() with cli::cli_abort(), updated @return doc
    • R/graph_seroresponse_model_1.R: same swap
    • DESCRIPTION: replaced ggpubr with patchwork in Imports
  3. Version bump: 1.4.0.90041.4.0.9015 (one ahead of main at 1.4.0.9014)

  4. NEWS.md: Added ## Dependencies section noting the patchwork migration

  5. Docs: Regenerated all man/ pages via devtools::document(), updated the autoplot.seroincidence.by vdiffr snapshot for the new patchwork layout, added rlang to inst/WORDLIST

All 128 tests pass (1 Linux-only skip is expected).

— posted by @claude post-step from workflow run

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