@@ -6,16 +6,31 @@ inter-release development versions will include an additional ".9999" suffix.
66
77## Breaking changes:
88
9- * Changes to ` epix_slide ` :
10- * The ` f ` computation is now required to take at least three arguments. ` f `
11- must take an ` epi_df ` with the same column names as the archive's ` DT ` ,
9+ * Changes to ` epi_slide ` and ` epix_slide ` :
10+ * If ` f ` is a function, it is now required to take at least three arguments.
11+ ` f ` must take an ` epi_df ` with the same column names as the archive's ` DT ` ,
1212 minus the ` version ` column; followed by a one-row tibble containing the
13- values of the grouping variables for the associated group; followed by a
14- Date containing the reference time value that was used; followed by any
15- number of named arguments.
13+ values of the grouping variables for the associated group; followed by * a
14+ time value (usually a ` Date ` ) containing the reference time value that was
15+ used. Optionally, it can take any number of additional arguments, which will
16+ be forwarded through ` epi[x]_slide ` 's ` ... ` args.
17+ * To make your existing slide computations work, add a third argument to
18+ your ` f ` function to accept this new input: e.g., change `f = function(x,
19+ g, <any other arguments >) { <body > }` to ` f = function(x, g, rt, <any
20+ other arguments>) { <body > }`.
1621
1722## New features:
1823
24+ * ` epi_slide ` and ` epix_slide ` also make the window data, group key and reference
25+ time value available to slide computations specified as formulas or tidy
26+ evaluation expressions, in additional or completely new ways.
27+ * If ` f ` is a formula, it can now access the reference time value via ` .z ` or
28+ ` .ref_time_value ` .
29+ * If ` f ` is missing, the tidy evaluation expression in ` ... ` can now refer to
30+ the window data as an ` epi_df ` or ` tibble ` with ` .x ` , the group key with
31+ ` .group_key ` , and the reference time value with ` .ref_time_value ` . The usual
32+ ` .data ` and ` .env ` pronouns also work, but` pick() ` and ` cur_data() ` are not;
33+ work off of ` .x ` instead.
1934* ` epix_slide ` has been made more like ` dplyr::group_modify ` . It will no longer
2035 perform element/row recycling for size stability, accepts slide computation
2136 outputs containing any number of rows, and no longer supports ` all_rows ` .
@@ -29,11 +44,6 @@ inter-release development versions will include an additional ".9999" suffix.
2944 more closely whether/when/how to output an ` epi_df ` .
3045 * To keep the old behavior, convert the output of ` epix_slide() ` to ` epi_df `
3146 when desired and set the metadata appropriately.
32- * ` epix_slide ` ` f ` computations passed as functions or formulas now have
33- access to the reference time value. If ` f ` is a function, it is passed a
34- Date containing the reference time value as the third argument. If a
35- formula, ` f ` can access the reference time value via ` .z ` or
36- ` .ref_time_value ` .
3747
3848## Improvements:
3949
0 commit comments