Skip to content

Commit

Permalink
Minor fixes and small notes
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Feb 22, 2022
1 parent 6560aa1 commit 1b0c508
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions logicals-numbers.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,14 @@ near(1 / 49 * 49, 1)

Alternatively, you might want to use `round()` to trim off extra digits.

## Exercises
### Exercises

1. Currently `dep_time` and `sched_dep_time` are convenient to look at, but hard to compute with because they're not really continuous numbers.
Convert them to a more convenient representation of number of minutes since midnight.

1. What trigonometric functions does R provide?
2. What trigonometric functions does R provide?

2. Brainstorm at least 5 different ways to assess the typical delay characteristics of a group of flights.
3. Brainstorm at least 5 different ways to assess the typical delay characteristics of a group of flights.
Consider the following scenarios:

- A flight is 15 minutes early 50% of the time, and 15 minutes late 50% of the time.
Expand Down
2 changes: 2 additions & 0 deletions missing-values.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ treatment %>%
fill(person)
```

`group_by` + `.drop = FALSE`

### Exercises

1. Compare and contrast the `fill` arguments to `pivot_wider()` and `complete()`.
Expand Down
1 change: 0 additions & 1 deletion workflow-pipes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,3 @@ But they're good to know about even if you've never used `%>%`, because you're l

- Starting a pipe with `.`, like `. %>% group_by(x) %>% summarise(x)` would create a function rather than immediately performing the pipe.
This is an error with the base pipe.

0 comments on commit 1b0c508

Please sign in to comment.