split_aggregate_CSV_decoupled {MGDrivE2}R Documentation

Split CSV output for decoupled sampling with Imperial malaria model

Description

This function reads in the output files from sim_trajectory_CSV and splits them into smaller files. The files are output by patch, with the appropriate patch numbers for mosquitoes or humans, and specific stages are aggregated by a given metric.

Usage

split_aggregate_CSV_decoupled(
  read_dir,
  write_dir = read_dir,
  spn_P,
  tmax,
  dt,
  human_states,
  sum_fem = FALSE,
  rem_file = FALSE,
  verbose = TRUE,
  erlang = FALSE
)

Arguments

read_dir

Directory where output was written to

write_dir

Directory to write output to. Default is read_dir

spn_P

Places object, see details

tmax

The final time to end simulation

dt

The time-step at which to return output (not the time-step of the sampling algorithm)

human_states

human state distribution

sum_fem

if TRUE, in addition to FS, FE, FI output by node and repetition, output an additional file F which sums over infection states (S,E,I). Does nothing if the simulation did not include epi dynamics.

rem_file

Remove original output? Default is FALSE

verbose

Chatty? Default is TRUE

erlang

erlang distributed states

Details

Given the read_dir, this function assumes the follow file structure:

This function expects the write_dir to be empty, and it sets up the same file structure as the read_dir. For a 2-node simulation, the output will be organized similar to:

The places (spn_P) object is generated from one of the following: spn_P_lifecycle_node, spn_P_lifecycle_network, spn_P_epiSIS_node, spn_P_epiSIS_network, spn_P_epiSEIR_node, or spn_P_epiSEIR_network.

tmax, dt define the last sampling time, and each sampling time in-between.

For more details about using this function to process CSV output see: vignette("data-analysis", package = "MGDrivE2")

Value

Writes output to files in write_dir


[Package MGDrivE2 version 2.1.0 Index]