Skip to content

Commit f2f3b66

Browse files
committed
Mention tidy eval facets in NEWS
1 parent 7665f47 commit f2f3b66

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

NEWS.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,26 @@
22

33
## New features
44

5-
* `aes()` now supports quasiquotation so that you can use `!!`, `!!!`, and
6-
`:=`. (ggplot2 does not currently support full tidy evaluation because
7-
when I wrote ggplot2 my understanding of NSE was quite flawed, and hence
8-
ggplot2 only captures one environment per plot, not one environment
9-
per aesthetic. We will fix this in a future release.)
5+
* `aes()` now supports quasiquotation so that you can use `!!`, `!!!`,
6+
and `:=`.
7+
8+
* `facet_wrap()` and `facet_grid()` now support `vars()` inputs. Like
9+
`dplyr::vars()`, this helper quotes its inputs and supports
10+
quasiquotation. For instance you can now supply facetting variables
11+
like this: `facet_wrap(vars(am, cyl))` instead of `facet_wrap(~am +
12+
cyl)`.
13+
14+
The first two arguments of `facet_grid()` become `rows` and `cols`
15+
and now support `vars()` inputs. Note however that we took special
16+
care to ensure complete backward compatibility. With this change
17+
`facet_grid(vars(cyl), vars(am, vs))` is equivalent to
18+
`facet_grid(cyl ~ am + vs)` and `facet_grid(cols = vars(am, vs))` is
19+
equivalent to `facet_grid(. ~ am + vs)`.
20+
21+
One nice aspect of the new interface is that you can now easily
22+
supply names: `facet_grid(vars(Cylinder = cyl), labeller =
23+
label_both)` will give nice label titles to the facets. Of course
24+
those names can be unquoted with the usual tidy eval syntax.
1025

1126
* ggplot2 now works on R 3.1 onwards, and uses the
1227
[vdiffr](https://github.com/lionel-/vdiffr) package for visual testing.

0 commit comments

Comments
 (0)