Per the facet_wrap() documentation, the tilde notation in the facets argument is for "compatibility with the classic interface". It appears vars() should be used instead.
There are a few places in this book where facet_wrap() uses the tilde. It may be best to convert to vars().
For example, near the end of chapter 1 is this code example:
Per the
facet_wrap()
documentation, the tilde notation in thefacets
argument is for "compatibility with the classic interface". It appearsvars()
should be used instead.There are a few places in this book where
facet_wrap()
uses the tilde. It may be best to convert tovars()
.For example, near the end of chapter 1 is this code example:
The
facet_wrap()
function call may be changed tofacet_wrap(vars(author), ncol = 2)
.In chapter 2 is this code example:
The
facet_wrap()
function call may be changed tofacet_wrap(vars(book), ncol = 2, scales = "free_x")
.