Two changes suggested by Toshi (#550)
1. Adds a select() call when exploring diamonds sizes to ensure that the anomalous y variable appears on the page of the printed book (where it is discussed). 2. Adds message = FALSE to suppress "Loading required package: methods" message.
This commit is contained in:
parent
7494ea1c01
commit
881a900303
3
EDA.Rmd
3
EDA.Rmd
|
@ -190,6 +190,7 @@ old <- options(tibble.print_max = 10, tibble.print_min = 10)
|
|||
```{r}
|
||||
unusual <- diamonds %>%
|
||||
filter(y < 3 | y > 20) %>%
|
||||
select(price, x, y, z) %>%
|
||||
arrange(y)
|
||||
unusual
|
||||
```
|
||||
|
@ -458,7 +459,7 @@ But using transparency can be challenging for very large datasets. Another solut
|
|||
|
||||
`geom_bin2d()` and `geom_hex()` divide the coordinate plane into 2d bins and then use a fill color to display how many points fall into each bin. `geom_bin2d()` creates rectangular bins. `geom_hex()` creates hexagonal bins. You will need to install the hexbin package to use `geom_hex()`.
|
||||
|
||||
```{r, fig.asp = 1, out.width = "50%", fig.align = "default"}
|
||||
```{r, fig.asp = 1, out.width = "50%", fig.align = "default", message = FALSE}
|
||||
ggplot(data = smaller) +
|
||||
geom_bin2d(mapping = aes(x = carat, y = price))
|
||||
|
||||
|
|
Loading…
Reference in New Issue