tidyverse / funs

Collection of low-level functions for working with vctrs
Other
34 stars 7 forks source link

`incremental_*()` functions #63

Open romainfrancois opened 3 years ago

romainfrancois commented 3 years ago

initially copies of the functions from dplyr, except using vec_assert(logical()).

are we expecting to use C, C++ in funs ?

romainfrancois commented 3 years ago

closes #39

romainfrancois commented 3 years ago

"cumulative any" and "cumulative all" don't really feel right, given how these are documented in dplyr, perhaps we can find other ways to express them:

#' @section Cumulative logical functions:
#'
#' These are particularly useful in conjunction with `filter()`:
#'
#' * `cumall(x)`: all cases until the first `FALSE`.
#' * `cumall(!x)`: all cases until the first `TRUE`.
#' * `cumany(x)`: all cases after the first `TRUE`.
#' * `cumany(!x)`: all cases after the first `FALSE`.
romainfrancois commented 3 years ago

How about incremental_*() for the whole cum_* family from #5 ?