Delay adding the conf.low and conf.high to the ggplot aes() until add_confidence_interval() has been called. Previously, these were being added in the first call to ggplot(tidy_data, aes(x = time, y = estimate, ymin = conf.low, ymax = conf.high)). The result was that figures that did not show the confidence interval still created space for the CI in the plot area. This update eliminates that blank space. (#123)
If there is an GitHub issue associated with this pull request, please provide link.
closes #123
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")
What changes are proposed in this pull request?
conf.low
andconf.high
to the ggplotaes()
untiladd_confidence_interval()
has been called. Previously, these were being added in the first call toggplot(tidy_data, aes(x = time, y = estimate, ymin = conf.low, ymax = conf.high))
. The result was that figures that did not show the confidence interval still created space for the CI in the plot area. This update eliminates that blank space. (#123)If there is an GitHub issue associated with this pull request, please provide link. closes #123
Reviewer Checklist (if item does not apply, mark is as complete)
renv::install()
_pkgdown.yml
pkgdown::build_site()
. Check the R console for errors, and review the rendered website.withr::with_envvar(new = c("NOT_CRAN" = "true"), covr::report())
. Begin in a fresh R session without any packages loaded.usethis::use_spell_check()
runs with no spelling errors in documentationWhen the branch is ready to be merged into master:
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 (seeNEWS.md
for examples).usethis::use_version(which = "dev")
codemetar::write_codemeta()
usethis::use_spell_check()
again