Remove confusing question

Fixes #1255
This commit is contained in:
Hadley Wickham 2023-02-07 10:19:55 -06:00
parent af16cfc084
commit c2f90cc3f0
1 changed files with 5 additions and 10 deletions

View File

@ -397,26 +397,21 @@ ggplot(flights, aes(x = dep_sched %% 60)) + geom_histogram(binwidth = 1)
ggplot(flights, aes(x = air_time - airtime2)) + geom_histogram()
```
1. Compare `air_time` with `arr_time - dep_time`.
What do you expect to see?
What do you see?
What do you need to do to fix it?
2. Compare `dep_time`, `sched_dep_time`, and `dep_delay`.
1. Compare `dep_time`, `sched_dep_time`, and `dep_delay`.
How would you expect those three numbers to be related?
3. Brainstorm as many ways as possible to select `dep_time`, `dep_delay`, `arr_time`, and `arr_delay` from `flights`.
2. Brainstorm as many ways as possible to select `dep_time`, `dep_delay`, `arr_time`, and `arr_delay` from `flights`.
4. What happens if you include the name of a variable multiple times in a `select()` call?
3. What happens if you include the name of a variable multiple times in a `select()` call?
5. What does the `any_of()` function do?
4. What does the `any_of()` function do?
Why might it be helpful in conjunction with this vector?
```{r}
variables <- c("year", "month", "day", "dep_delay", "arr_delay")
```
6. Does the result of running the following code surprise you?
5. Does the result of running the following code surprise you?
How do the select helpers deal with case by default?
How can you change that default?