Skip to content

Commit c2da965

Browse files
authored
Merge pull request #22 from kenmawer/km-issue_27
Polished test.
2 parents 0961ecd + 6b7862f commit c2da965

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/testthat/test-step_naomit2.R

+2-5
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,17 @@ x <- tibble(geo_value = rep("nowhere",200),
1111
death_rate = rpois(100,10) + 1:200) %>%
1212
as_epi_df()
1313

14+
# Preparing the datasets to be used for comparison
1415
r <- epi_recipe(x) %>%
1516
step_epi_ahead(death_rate, ahead = 7) %>%
1617
step_epi_lag(death_rate, lag = c(0,7,14))
1718

18-
extract <- function(recipe) {
19-
recipe
20-
}
21-
2219
z1 <- step_naomit2(r)
2320
z2 <- r %>%
2421
step_naomit(all_predictors()) %>%
2522
step_naomit(all_outcomes(), skip = TRUE)
2623

27-
# Tests
24+
# Test
2825
test_that("Check that both functions behave the same way", {
2926
expect_identical(z1$steps[[3]][-1][-5],z2$steps[[3]][-1][-5])
3027
expect_identical(z1$steps[[4]][-1][-5],z2$steps[[4]][-1][-5])

0 commit comments

Comments
 (0)