@@ -215,6 +215,11 @@ assert_sufficient_f_args <- function(f, ...) {
215215# ' scoping issues involved. Package developers should avoid
216216# ' supplying functions by name and instead supply them by value.
217217# '
218+ # ' @param before how far `before` each `ref_time_value` the sliding window
219+ # ' should extend, as specified in the parent `epi[x]_slide` call Must be a
220+ # ' single, non-`NA`, non-negative,[integer-compatible]
221+ # ' [vctrs::vec_cast] number of time steps. Used only when
222+ # ' `calc_ref_time_value` is `TRUE`
218223# ' @param calc_ref_time_value Boolean indicating whether the computation
219224# ' function should include a step to calculate `ref_time_value` based on the
220225# ' contents of the group data `.x`. This is used in `epi_slide`. When this
@@ -244,8 +249,8 @@ assert_sufficient_f_args <- function(f, ...) {
244249# '
245250# ' @noRd
246251as_slide_computation <- function (x ,
247- calc_ref_time_value = FALSE ,
248252 before ,
253+ calc_ref_time_value = FALSE ,
249254 env = global_env(),
250255 ... ,
251256 arg = caller_arg(x ),
@@ -261,8 +266,7 @@ as_slide_computation <- function(x,
261266 data_env = rlang :: as_environment(.x )
262267 data_mask = rlang :: new_data_mask(bottom = data_env , top = data_env )
263268 data_mask $ .data <- rlang :: as_data_pronoun(data_mask )
264- # We'll also install `.x` directly, not as an `rlang_data_pronoun`, so
265- # that we can, e.g., use more dplyr and epiprocess operations.
269+ # Also install `.x` directly.
266270 data_mask $ .x = .x
267271 data_mask $ .group_key = .group_key
268272 data_mask $ .ref_time_value = .ref_time_value
0 commit comments