Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plot arithmetic #115

Closed
wants to merge 23 commits into from
Closed

Plot arithmetic #115

wants to merge 23 commits into from

Conversation

ddsjoberg
Copy link
Collaborator

@ddsjoberg ddsjoberg commented Oct 9, 2022

What changes are proposed in this pull request?

  • Added patchwork-like arithmetic operators for combining ggsurvit figures: |, -, and \.

Caveats:

  • I couldn't figure out how to implement the + operator.
  • I didn't implement * and & because I am not really sure what they are for!
  • Because there is not 100% consistency with the patchwork operators, is it even work adding these to the pkg? I think so, because it makes it much easier to place plots side by side (no need to build the figure before placing side by side).
  • User can use the patchwork operators directly, but the ggsurvfit object must first be built, then wrapped in wrap_elements(). But that is pretty confusing to most users I would imagine.

image

If there is an GitHub issue associated with this pull request, please provide link.
closes #96


Reviewer Checklist (if item does not apply, mark is as complete)

  • Ensure all package dependencies are installed by running renv::install()
  • PR branch has pulled the most recent updates from master branch. Ensure the pull request branch and your local version match and both have the latest updates from the master branch.
  • If a new function was added, function included in _pkgdown.yml
  • If a bug was fixed, a unit test was added for the bug check
  • Run pkgdown::build_site(). Check the R console for errors, and review the rendered website.
  • Overall code coverage remains >99.5%. Review coverage with withr::with_envvar(new = c("NOT_CRAN" = "true"), covr::report()). Begin in a fresh R session without any packages loaded.
  • R CMD Check runs without errors, warnings, and notes
  • usethis::use_spell_check() runs with no spelling errors in documentation

When the branch is ready to be merged into master:

  • Update NEWS.md with the changes from this pull request under the heading "# ggsurvfit (development version)". If there is an issue associated with the pull request, reference it in parentheses at the end update (see NEWS.md for examples).
  • Increment the version number using usethis::use_version(which = "dev")
  • Run codemetar::write_codemeta()
  • Run usethis::use_spell_check() again
  • Approve Pull Request
  • Merge the PR. Please use "Squash and merge".

@michaelcurry1123

This comment was marked as outdated.

@michaelcurry1123

This comment was marked as outdated.

@ddsjoberg

This comment was marked as outdated.

@ddsjoberg ddsjoberg marked this pull request as draft October 14, 2022 19:14
@michaelcurry1123

This comment was marked as outdated.

@ddsjoberg

This comment was marked as outdated.

@michaelcurry1123
Copy link

complex issue! happy to help think through this with you for next release.

@ddsjoberg
Copy link
Collaborator Author

closing in favor of S7

@ddsjoberg ddsjoberg closed this Oct 10, 2023
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.

Plot arithmetic for ggsurvfit?
2 participants