-
Notifications
You must be signed in to change notification settings - Fork 8
Description
The slide function documentation is wordy and complicated, and the code is very complicated.
Consider making epi_slide() support only the tidyeval case, removing .f and .new_col_name. Maybe consider moving .window_size before ... so one could do edf %>% epi_slide(28, md_rate = median(rate)). Would play better with tibble(outcol1 = ...., outcol2 = ....) tidyeval feature, as there is no need to add an extra comma to make .f missing. Would also play better if we eventually add across support. Potential drawbacks:
- Tidyeval overhead may mean this is significantly slower than alternatives.
- Requires some arcane syntax for more complicated computations;
my_growth_rate = { <multiple statements> }.
In epix_slide(), function and formula .f and outputting data frames, not ordinary vectors, is more common, though data-masking and ordinary-vector output might be used for some max time_value / reporting latency calculations. We could potentially force function/formula usage.
It'd also be good to do this at the same time as, or after, renaming epi_slide() and epix_slide() to more distinct names.