Skip to content

Commit

Permalink
update config writer functions
Browse files Browse the repository at this point in the history
  • Loading branch information
shauntruelove committed Sep 14, 2023
1 parent 7ac7c9a commit 600ae69
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions flepimop/R_packages/config.writer/NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export(print_header)
export(print_inference_hierarchical)
export(print_inference_prior)
export(print_inference_statistics)
export(print_init_conditions)
export(print_interventions)
export(print_outcomes)
export(print_seeding)
Expand Down
15 changes: 8 additions & 7 deletions flepimop/R_packages/config.writer/R/yaml_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ print_spatial_setup <- function (
" census_year: ", census_year, "\n"),
ifelse(!is.null(modeled_states),
paste0(" modeled_states:\n",
" - ", modeled_states, "\n"),""),
paste(as.vector(sapply(modeled_states, function(x) paste0(" - ", x, "\n"))), collapse = "")),""),
paste0("\n",
" geodata: ", geodata_file, "\n",
" mobility: ", mobility_file, "\n",
Expand All @@ -623,6 +623,7 @@ print_spatial_setup <- function (




#' Print SEIR Section
#' @description Print seir section with specified parameters.
#'
Expand Down Expand Up @@ -1994,12 +1995,12 @@ seir_chunk <- function(resume_modifier = NULL,
#' @description Print initial conditions section of config
#'
#' @param method
#' @param proportional
#' @param proportional
#' @param perturbation if TRUE, will print perturbation section, requires other values below
#' @param pert_dist distribution of the perturbation
#' @param pert_mean mean of perturbation
#' @param pert_sd standard deviation of perturbation
#' @param pert_a minimum value of perturbation
#' @param pert_a minimum value of perturbation
#' @param pert_b maximum value of perturbation
#'
#' @details
Expand All @@ -2010,14 +2011,14 @@ seir_chunk <- function(resume_modifier = NULL,
#' print_init_conditions()
#'
print_init_conditions <- function(method = "SetInitialConditionsFolderDraw",
proportional = "True",
proportional = "True",
perturbation = TRUE,
pert_dist = "truncnorm",
pert_mean = 0,
pert_mean = 0,
pert_sd = 0.02,
pert_a = -1,
pert_b = 1){

cat(paste0("initial_conditions: \n",
" method: ", method, "\n",
" proportional: ", proportional, "\n",
Expand All @@ -2029,7 +2030,7 @@ print_init_conditions <- function(method = "SetInitialConditionsFolderDraw",
" b: ", pert_b),
"\n")
))

}


0 comments on commit 600ae69

Please sign in to comment.