Follow recommended practice for using ggplot2::aes() in packages #124
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.
I updated the use of
ggplot2::aes()
to follow the best practice recommendations from the ggplot2 maintainers in their vignette Using ggplot2 in packages:Trying to find the minimum required version of {ggplot2} to support the current best practice required some trial and error. Support for tidy evaluation was first added in version 3.0.0 in July 2019 (CRAN archives). However, the test suite failed with this version. By binary searching through the potential versions, I determined that version 3.1.1 is the minimum required version. It's a patch release from April 2019 that for some reason doesn't have its own NEWS entry. The test suite passes with the version, with the minor exception that a few of the snapshot tests fail because the order of the legends is reversed (ie only the display, and not the actual content, was affected).