Skip to content

Commit db2f274

Browse files
committed
perf: try vec_c -> c on 3 time_values
As `vec_c` is slower on 3 scalar `Date`s, and it's probably pretty uncommon to use `time_value`s with `c` incompatible with `vec_c` (though possible... maybe tibbles with year, week, wday, like from MMWRweek; though these would probably break inside archive DT).
1 parent 80966e2 commit db2f274

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/epi_slide_opt_edf.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ epi_slide_opt_one_epikey <- function(inp_tbl,
231231
range = vec_rep_each(
232232
c(FALSE, TRUE, FALSE),
233233
time_minus_time_in_n_steps(
234-
vctrs::vec_c(out_t_min, out_t_max, slide_t_max),
235-
vctrs::vec_c(slide_t_min, out_t_min, out_t_max),
234+
c(out_t_min, out_t_max, slide_t_max),
235+
c(slide_t_min, out_t_min, out_t_max),
236236
time_type
237237
) + c(0L, 1L, 0L)
238238
),

0 commit comments

Comments
 (0)