Update functions.qmd (#1112)

Fixed a minor repetition
This commit is contained in:
Matan Hakim 2022-10-26 01:39:28 +03:00 committed by GitHub
parent f93a5daeeb
commit 8fd4d856c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -532,7 +532,7 @@ flights |> unique_where(tailnum == "N14228", month)
Here we embrace `condition` because it's passed to `filter()` and `var` because its passed to `distinct()`, `arrange()`, and `pull()`.
We've made all these examples take a data frame as the first argument, but if you're working repeatedly with the same data, it can make sense to hardcode it.
For example, the following function always works with the flights dataset and always selects `time_hour`, `carrier`, and `flight` since they are form the compound primary key that allows you to identify a row.
For example, the following function always works with the flights dataset and always selects `time_hour`, `carrier`, and `flight` since they form the compound primary key that allows you to identify a row.
```{r}
flights_sub <- function(rows, cols) {