Skip to content

Commit

Permalink
Arg implementation_level removed from daedalus()
Browse files Browse the repository at this point in the history
Update `daedalus()` docs
  • Loading branch information
pratikunterwegs committed Oct 10, 2024
1 parent d8ba3fc commit 92024d7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion R/class_output.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ validate_daedalus_output <- function(x) {
"model_data",
# NOTE: reserving 'parameters' for values fixed before model run
"country_parameters", "infection_parameters",
"response_data" # includes response strategy and implementation level
"response_data" # includes response strategy
)

stopifnot(
Expand Down
10 changes: 1 addition & 9 deletions R/daedalus.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
#' While the response strategy is active, economic contacts are scaled using the
#' package data object `daedalus::closure_data`.
#'
#' @param implementation_level A string for the level at which the strategy is
#' implemented; defaults to "light".
#'
#' @param response_time A single numeric value for the time in days
#' at which the selected response is activated. This is ignored if the response
#' has already been activated by the hospitalisation threshold being reached.
Expand Down Expand Up @@ -113,7 +110,6 @@ daedalus <- function(country,
"none", "elimination", "economic_closures",
"school_closures"
),
implementation_level = c("light", "heavy"),
vaccine_investment = c(
"none", "low", "medium", "high"
),
Expand All @@ -136,7 +132,6 @@ daedalus <- function(country,
}

response_strategy <- rlang::arg_match(response_strategy)
implementation_level <- rlang::arg_match(implementation_level)

is_good_time_end <- checkmate::test_count(time_end, positive = TRUE)
if (!is_good_time_end) {
Expand Down Expand Up @@ -215,9 +210,7 @@ daedalus <- function(country,
mutables <- prepare_mutable_parameters()

# add the appropriate economic openness vectors to parameters
openness <- daedalus::closure_data[[
response_strategy
]][[implementation_level]]
openness <- daedalus::closure_data[[response_strategy]]

# NOTE: psi (vax waning rate), tau (vax reduction in suscept.), and dims of nu
# are hard-coded until vaccination scenarios are decided
Expand Down Expand Up @@ -351,7 +344,6 @@ daedalus <- function(country,
infection_parameters = unclass(infection),
response_data = list(
response_strategy = response_strategy,
implementation_level = implementation_level,
openness = openness, # easier to include here
closure_info = get_closure_info(mutables)
)
Expand Down
4 changes: 0 additions & 4 deletions man/daedalus.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 92024d7

Please sign in to comment.