Skip to content

Commit

Permalink
Move removal of element of obs_opts() into checker function
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmbaazam committed Sep 20, 2024
1 parent ea392dd commit 778b3eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions R/estimate_infections.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
10 changes: 5 additions & 5 deletions R/estimate_secondary.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 778b3eb

Please sign in to comment.