This function reads in the output files from
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.
split_aggregate_CSV( read_dir, write_dir = read_dir, stage = c("E", "L", "P", "M", "U", "FS", "FE", "FI", "H"), spn_P, tmax, dt, erlang = FALSE, sum_fem = FALSE, rem_file = FALSE, verbose = TRUE )
Directory where output was written to
Directory to write output to. Default is read_dir
Life stage to print, see details
Places object, see details
The final time to end simulation
The time-step at which to return output (not the time-step of the sampling algorithm)
Boolean, default is FALSE, to return summaries by genotype
Remove original output? Default is FALSE
Chatty? Default is TRUE
Writes output to files in write_dir
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:
stage defines which life-stages the function will analyze. These stages
must be any combination of: "E", "L", "P", "M", "U", "FS", "FE", "FI", "H".
These must come from the set of stages provided to
stage argument. It can be less than what was printed by the simulation,
but any extra stages provided, but not printed, will throw a warning and then
erlang defines how aquatic (eggs, larvae, and pupae) stages and adult females
(only mated females) are aggregated. By default,
erlang is FALSE, and
all of these stages are summarized by genotype only, combining any Erlang-distributed
dwell stages (for eggs, larvae, and pupae) or latent infection (for adult females)
erlang is TRUE, summaries are returned by dwell stage or infection
status, combining any genotype information.
Female summaries always combine over mate-genotype, so only female genotypes are returned.
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")