From e2d5d7b31aa474d3e75729543bd19e1a27dd437d Mon Sep 17 00:00:00 2001 From: aleloi Date: Mon, 8 Feb 2021 17:30:54 +0100 Subject: [PATCH] Switch from stat() to after_stat() in chap 3. (#895) The docs in of aes_eval in [most recent](https://ggplot2.tidyverse.org/reference/aes_eval.html?q=after%20_%20stat#arguments) ggplot2 3.3.2 say that after_stat() and after_scale() has replaced stat(). --- visualize.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/visualize.Rmd b/visualize.Rmd index b5d2fd7..937aa39 100644 --- a/visualize.Rmd +++ b/visualize.Rmd @@ -522,7 +522,7 @@ This works because every geom has a default stat; and every stat has a default g ```{r} ggplot(data = diamonds) + - geom_bar(mapping = aes(x = cut, y = stat(prop), group = 1)) + geom_bar(mapping = aes(x = cut, y = after_stat(prop), group = 1)) ``` To find the variables computed by the stat, look for the help section