diff --git a/R/estimate_infections.R b/R/estimate_infections.R index 6a850b594..a76f5275a 100644 --- a/R/estimate_infections.R +++ b/R/estimate_infections.R @@ -170,11 +170,11 @@ estimate_infections <- function(data, # If the user is using the default treatment of NA's as missing and # their data has implicit or explicit NA's, inform them of what's - # happening and alternatives. - check_na_setting_against_data(obs = obs, data = dirty_reported_cases) - # Remove "na_as_missing_default_used" after using it above - obs$na_as_missing_default_used <- NULL - + # happening and provide alternatives. + obs <- check_na_setting_against_data( + obs = obs, + data = dirty_reported_cases + ) # Create clean and complete cases # Order cases reported_cases <- create_clean_reported_cases( diff --git a/R/estimate_secondary.R b/R/estimate_secondary.R index ddc112fb5..13a01c09f 100644 --- a/R/estimate_secondary.R +++ b/R/estimate_secondary.R @@ -191,11 +191,11 @@ estimate_secondary <- function(data, # If the user is using the default treatment of NA's as missing and # their data has implicit or explicit NA's, inform them of what's - # happening and alternatives. - check_na_setting_against_data(obs = obs, data = secondary_reports_dirty) - # Remove "na_as_missing_default_used" after using it above - obs$na_as_missing_default_used <- NULL - + # happening and provide alternatives. + obs <- check_na_setting_against_data( + obs = obs, + data = secondary_reports_dirty + ) ## fill in missing data (required if fitting to prevalence) complete_secondary <- create_complete_cases(secondary_reports) ## fill down