Fixing typo in functions chapter (#1417)
This commit is contained in:
parent
ae818956b2
commit
0a3456cc67
|
@ -403,7 +403,7 @@ Embracing a variable means to wrap it in braces so (e.g.) `var` becomes `{{ var
|
|||
Embracing a variable tells dplyr to use the value stored inside the argument, not the argument as the literal variable name.
|
||||
One way to remember what's happening is to think of `{{ }}` as looking down a tunnel --- `{{ var }}` will make a dplyr function look inside of `var` rather than looking for a variable called `var`.
|
||||
|
||||
So to make grouped_mean`()` work, we need to surround `group_var` and `mean_var()` with `{{ }}`:
|
||||
So to make grouped_mean`()` work, we need to surround `group_var` and `mean_var` with `{{ }}`:
|
||||
|
||||
```{r}
|
||||
grouped_mean <- function(df, group_var, mean_var) {
|
||||
|
|
Loading…
Reference in New Issue