The goal of this function is **to** compute the mean (#1436)

add "to"
This commit is contained in:
Peter Baumgartner 2023-04-17 15:13:33 +02:00 committed by GitHub
parent 4c30b96b3a
commit 3304cac69a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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) {