Move sentence to better place & finish it.

This commit is contained in:
Hadley Wickham 2022-08-08 13:58:29 -05:00
parent 0b7f9f248b
commit 67b5e673b9
1 changed files with 2 additions and 1 deletions

View File

@ -355,7 +355,6 @@ cut(x, breaks = c(0, 5, 10, 100))
You can optionally supply your own `labels`.
Note that there should be one less `labels` than `breaks`.
`right` and `include.lowest` control the details of the intervals.
```{r}
cut(x,
@ -371,6 +370,8 @@ y <- c(NA, -10, 5, 10, 30)
cut(y, breaks = c(0, 5, 10, 15, 20))
```
See the documentation for other useful arguments like `right` and `include.lowest`, which control if the intervals are `[a, b)` or `(a, b]` and if the lowest interval should be `[a, b]`.
### Cumulative and rolling aggregates
Base R provides `cumsum()`, `cumprod()`, `cummin()`, `cummax()` for running, or cumulative, sums, products, mins and maxes.