We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 307fb6e commit 0b48ea4Copy full SHA for 0b48ea4
tests/testthat/test-epi_slide.R
@@ -510,3 +510,13 @@ test_that("epi_slide computation via dots outputs the same result using col name
510
511
expect_identical(result1, expected_output)
512
})
513
+
514
+test_that("`epi_slide` can access objects inside of helper functions", {
515
+ helper = function(archive_haystack, time_value_needle) {
516
+ archive_haystack %>% epi_slide(has_needle = time_value_needle %in% time_value, before = 365000L)
517
+ }
518
+ expect_error(
519
+ helper(small_x, as.Date("2021-01-01")),
520
+ NA
521
+ )
522
+})
0 commit comments