Skip to content

Commit

Permalink
typo fixes in transform.Rmd
Browse files Browse the repository at this point in the history
  • Loading branch information
rlzijdeman committed Jun 5, 2016
1 parent 2ab8e74 commit f9e69b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions transform.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ flights %>%
summarise(mean = mean(dep_delay))
```

We get a lot of missing values! That's because aggregation functions obey the usual rule of missing values: if there's any missing value in the input, the output will be a missing value. `x %>% f(y)` turns into `f(x, y)`ou'll learn more about aggregation functions in Section 5.7.4. Fortunately, all aggregation functions have an `na.rm` argument which removes the missing values prior to computation:
We get a lot of missing values! That's because aggregation functions obey the usual rule of missing values: if there's any missing value in the input, the output will be a missing value. `x %>% f(y)` turns into `f(x, y)` you'll learn more about aggregation functions in Section 5.7.4. Fortunately, all aggregation functions have an `na.rm` argument which removes the missing values prior to computation:

```{r}
flights %>%
Expand Down Expand Up @@ -731,7 +731,7 @@ batters %>% arrange(desc(ba))

You can find a good explanation of this problem at <https://varianceexplained.org/r/empirical_bayes_baseball/> and <https://www.evanmiller.org/how-not-to-sort-by-average-rating.html>.

### Other summary functions.
### Other summary functions

Just using means, counts, and sum can get you a long way, but R provides many other useful summary functions:

Expand Down

0 comments on commit f9e69b7

Please sign in to comment.