Skip to content

Commit 896e12f

Browse files
Alternate .by syntax
1 parent 460b1da commit 896e12f

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

_freeze/html/data-transformation/execute-results/html.json

Lines changed: 3 additions & 5 deletions
Large diffs are not rendered by default.

data-transformation.pdf

126 KB
Binary file not shown.

html/data-transformation.qmd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ Summary functions take vectors as input and return one value back (see Summary F
7171
summarize(avg = mean(mpg))
7272
```
7373
74+
- Alternate grouping syntax with `.by` as an argument:
75+
76+
```{r}
77+
mtcars |>
78+
summarize(avg = mean(mpg), .by = cyl)
79+
```
80+
7481
- Use `rowwise(.data, ...)` to group data into individual rows.
7582
dplyr functions will compute results for each row.
7683
Also apply functions to list-columns.

html/images/logo-dplyr.png

0 Bytes
Loading

keynotes/data-transformation.key

38.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)