Skip to content

Commit 31f7f4c

Browse files
committed
Replaced t with ref_time_value.
1 parent a126abd commit 31f7f4c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

R/archive.R

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -673,12 +673,13 @@ epi_archive =
673673
if (!missing(f)) {
674674
if (rlang::is_formula(f)) f = rlang::as_function(f)
675675

676-
x = purrr::map_dfr(ref_time_values, function(t) {
677-
self$as_of(t, min_time_value = t - before_num) %>%
676+
x = purrr::map_dfr(ref_time_values, function(ref_time_value) {
677+
self$as_of(ref_time_value,
678+
min_time_value = ref_time_value - before_num) %>%
678679
dplyr::group_by(!!!group_by) %>%
679680
dplyr::group_modify(comp_one_grp,
680681
f = f, ...,
681-
time_value = t,
682+
time_value = ref_time_value,
682683
key_vars = key_vars,
683684
new_col = new_col,
684685
.keep = TRUE) %>%
@@ -700,12 +701,13 @@ epi_archive =
700701
f = function(x, quo, ...) rlang::eval_tidy(quo, x)
701702
new_col = sym(names(rlang::quos_auto_name(quos)))
702703

703-
x = purrr::map_dfr(ref_time_values, function(t) {
704-
self$as_of(t, min_time_value = t - before_num) %>%
704+
x = purrr::map_dfr(ref_time_values, function(ref_time_value) {
705+
self$as_of(ref_time_value,
706+
min_time_value = ref_time_value - before_num) %>%
705707
dplyr::group_by(!!!group_by) %>%
706708
dplyr::group_modify(comp_one_grp,
707709
f = f, quo = quo,
708-
time_value = t,
710+
time_value = ref_time_value,
709711
key_vars = key_vars,
710712
new_col = new_col,
711713
.keep = TRUE) %>%

0 commit comments

Comments
 (0)