Consistent function names

Fixes #790
This commit is contained in:
Hadley Wickham 2020-10-04 16:08:10 -05:00
parent 335a0cb291
commit f0215486cc
1 changed files with 2 additions and 2 deletions

View File

@ -938,9 +938,9 @@ vs <- list(
vs %>% reduce(intersect)
```
The reduce function takes a "binary" function (i.e. a function with two primary inputs), and applies it repeatedly to a list until there is only a single element left.
`reduce()` takes a "binary" function (i.e. a function with two primary inputs), and applies it repeatedly to a list until there is only a single element left.
Accumulate is similar but it keeps all the interim results. You could use it to implement a cumulative sum:
`accumulate()` is similar but it keeps all the interim results. You could use it to implement a cumulative sum:
```{r}
x <- sample(10)