From e25d3ac51bdb0339a64273d3aa5293c0f3bfb6a3 Mon Sep 17 00:00:00 2001 From: Zhuoer Dong Date: Thu, 16 Jan 2020 02:40:37 +0800 Subject: [PATCH] use `stat()` instead of `..` in "3.7 Statistical transformations" (#751) https://r4ds.had.co.nz/data-visualisation.html#statistical-transformations --- visualize.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/visualize.Rmd b/visualize.Rmd index 807a6b8..6ad961f 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 = ..prop.., group = 1)) + geom_bar(mapping = aes(x = cut, y = stat(prop), group = 1)) ``` To find the variables computed by the stat, look for the help section