committed by
GitHub
parent
4c30b96b3a
commit
3304cac69a
@@ -359,7 +359,7 @@ With this theory under your belt, we'll then show you a bunch of examples to ill
|
|||||||
|
|
||||||
When you start writing functions that use dplyr verbs you rapidly hit the problem of indirection.
|
When you start writing functions that use dplyr verbs you rapidly hit the problem of indirection.
|
||||||
Let's illustrate the problem with a very simple function: `grouped_mean()`.
|
Let's illustrate the problem with a very simple function: `grouped_mean()`.
|
||||||
The goal of this function is compute the mean of `mean_var` grouped by `group_var`:
|
The goal of this function is to compute the mean of `mean_var` grouped by `group_var`:
|
||||||
|
|
||||||
```{r}
|
```{r}
|
||||||
grouped_mean <- function(df, group_var, mean_var) {
|
grouped_mean <- function(df, group_var, mean_var) {
|
||||||
|
|||||||
Reference in New Issue
Block a user