File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -17,25 +17,23 @@ test_that("epix_slide works as intended",{
1717 binary = 2 ^ (1 : 12 )) %> %
1818 as_epi_archive()
1919
20- time_values <- c(2 ,3 : 5 )
21-
2220 xx1 <- epix_slide(x = xx ,
23- f = ~ sum(.xx $ binary ),
21+ f = ~ sum(.x $ binary ),
2422 before = 3 ,
2523 group_by = geo_value ,
26- ref_time_values = time_values ,
2724 new_col_name = " sum_binary" )
2825
29- xx2 <- tibble(geo_value = rep(" x" ,5 ),
30- time_value = as.Date(" 2020-06-01" ) + 1 : 5 ,
31- sum_binary = c(3 ))
26+ xx2 <- tibble(geo_value = rep(" x" ,2 ),
27+ time_value = c(5 ,6 ),
28+ sum_binary = c(2 ^ 7 ,
29+ 2 ^ 10 + 2 ^ 8 )) %> %
30+ as_epi_df()
3231
3332 expect_identical(xx1 ,xx2 ) # *
3433
35- xx3 <- xx $ slide(f = ~ sum(.xx $ binary ),
34+ xx3 <- xx $ slide(f = ~ sum(.x $ binary ),
3635 before = 3 ,
3736 group_by = " geo_value" ,
38- ref_time_values = time_values ,
3937 new_col_name = ' sum_binary' )
4038
4139 expect_identical(xx1 ,xx3 ) # This and * Imply xx2 and xx3 are identical
You can’t perform that action at this time.
0 commit comments