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

Fix warning: aes_string() was deprecated in ggplot2 3.0.0 #113

Closed
xrobin opened this issue May 14, 2023 · 1 comment
Closed

Fix warning: aes_string() was deprecated in ggplot2 3.0.0 #113

xrobin opened this issue May 14, 2023 · 1 comment
Labels

Comments

@xrobin
Copy link
Owner

xrobin commented May 14, 2023

Tests display the following warning on CI:

── Warning ('test-ggroc.R:9:2'): Ggroc screenshot looks normal ─────────────────
`aes_string()` was deprecated in ggplot2 3.0.0.
ℹ Please use tidy evaluation idioms with `aes()`.
ℹ See also `vignette("ggplot2-in-packages")` for more information.
Backtrace:
  1. pROC:::expect_doppelganger("ggroc.screenshot", test_ggplot_screenshot)
       at test-ggroc.R:9:8
  2. vdiffr::expect_doppelganger(title, fig, ...)
       at pROC-tests/testthat/helper-vdiffr.R:5:8
  3. vdiffr (local) writer(fig, testcase, title)
  5. vdiffr:::print_plot.function(plot, title)
  6. pROC (local) p()
  9. pROC:::ggroc.roc(...)
 10. pROC:::get.aes.for.ggplot(data, legacy.axes)
 12. ggplot2 (local) `<fn>`(x = "specificity", y = "sensitivity")
 13. ggplot2:::deprecate_soft0(...)

aes_string is used in the get.aes.for.ggplot function in ggroc.R to build the aesthetics. Alternatives are documented in Using ggplot2 in packages vignette.

Todo:

  • Optional: find out how to reproduce the warning outside of CI
  • Remove usage of aes_string in ggroc
@xrobin
Copy link
Owner Author

xrobin commented Jun 26, 2023

Solution as on StackOverflow.

@xrobin xrobin closed this as completed Jun 26, 2023
xrobin added a commit that referenced this issue Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant