|
2 | 2 |
|
3 | 3 | ## New features
|
4 | 4 |
|
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. |
10 | 25 |
|
11 | 26 | * ggplot2 now works on R 3.1 onwards, and uses the
|
12 | 27 | [vdiffr](https://github.com/lionel-/vdiffr) package for visual testing.
|
|
0 commit comments