tidyverse / funs

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

Accessible helper for run length encoded style groups #81

Closed DavisVaughan closed 2 years ago

DavisVaughan commented 2 years ago

Like this example https://stackoverflow.com/questions/21421047/using-ddply-to-apply-a-function-to-a-group-of-rows

I see this come up a lot, and people just use data.table::rleid().

I already added vctrs::vec_identify_runs() for this, we just need to formally expose it in a more user friendly way. Probably as something like runs(...) since a ... style interface would be more useful interactively

DavisVaughan commented 2 years ago

Probably a duplicate of https://github.com/tidyverse/dplyr/issues/5184