Final tidy polishing

This commit is contained in:
hadley
2016-07-27 08:23:28 -05:00
parent 6fdcf51930
commit f9e51a7096
2 changed files with 78 additions and 78 deletions

View File

@@ -355,7 +355,7 @@ transmute(flights,
)
```
### Useful creation functions
### Useful creation functions {#mutate-funs}
There are many functions for creating new variables that you can use with `mutate()`. The key property is that the function must be vectorised: it must take a vector of values as input, return a vector with the same number of values as output. There's no way to list every possible function that you might use, but here's a selection of functions that are frequently useful:
@@ -655,7 +655,7 @@ batters %>% arrange(desc(ba))
You can find a good explanation of this problem at <http://varianceexplained.org/r/empirical_bayes_baseball/> and <http://www.evanmiller.org/how-not-to-sort-by-average-rating.html>.
### Useful summary functions
### Useful summary functions {#summarise-funs}
Just using means, counts, and sum can get you a long way, but R provides many other useful summary functions: