From ceb13e779e81136eded2a1366a048ac4c15f9a6f Mon Sep 17 00:00:00 2001 From: Sebastian Funk Date: Fri, 22 Nov 2024 12:45:29 +0000 Subject: [PATCH] update tests --- tests/testthat/test-estimate_infections.R | 2 +- tests/testthat/test-estimate_secondary.R | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-estimate_infections.R b/tests/testthat/test-estimate_infections.R index 0b30419b3..549cfeef0 100644 --- a/tests/testthat/test-estimate_infections.R +++ b/tests/testthat/test-estimate_infections.R @@ -66,7 +66,7 @@ test_that("estimate_infections successfully returns estimates when accumulating reported_cases_weekly <- reported_cases_weekly[seq(7, nrow(reported_cases_weekly), 7)] reported_cases_weekly <- fill_missing( - reported_cases_weekly, na = "accumulate", initial_accumulate = 7 + reported_cases_weekly, missing_obs = "accumulate", initial_accumulate = 7 ) test_estimate_infections(reported_cases_weekly) }) diff --git a/tests/testthat/test-estimate_secondary.R b/tests/testthat/test-estimate_secondary.R index 48ff2c6bf..dfb9277a6 100644 --- a/tests/testthat/test-estimate_secondary.R +++ b/tests/testthat/test-estimate_secondary.R @@ -115,7 +115,9 @@ test_that("estimate_secondary successfully returns estimates when accumulating t cases_weekly <- merge( cases[, list(date, primary)], secondary_weekly, by = "date", all.x = TRUE ) - cases_weekly <- fill_missing(cases_weekly, na = "accumulate") + cases_weekly <- fill_missing( + cases_weekly, missing_obs = "accumulate", obs_column = "secondary" + ) inc_weekly <- estimate_secondary(cases_weekly, delays = delay_opts( LogNormal(