This function reads in all repetitions for each patch and calculates either the mean, quantiles, or both. User chooses the quantiles, up to 4 decimal places, and enters them as a vector. Quantiles are calculated empirically. (order does not matter)

summarize_stats_CSV(
mean = TRUE,
quantiles = NULL,
spn_P,
tmax,
dt,
rem_file = FALSE,
verbose = TRUE
)

## Arguments

read_dir Directory to find repetition folders in Directory to write output Boolean, calculate mean or not. Default is TRUE Vector of quantiles to calculate. Default is NULL 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) Remove original output? Default is FALSE Chatty? Default is TRUE

## Value

Writes output to files in write_dir

## Details

• repetition 1

• M_0001.csv

• M_0002.csv

• FS_0001.csv

• FS_0001.csv

• ...

• repetition 2

• M_0001.csv

• M_0002.csv

• FS_0001.csv

• FS_0001.csv

• ...

• repetition 3

• ...

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.

t0, tt, dt define the first sampling time, the last sampling time, and each sampling time in-between.

Output files are *.csv and contain the mean or quantile in the file name, e.g. stageMean(patchNum).csv and stageQuantile(quantNum)_(patchNum).csv.

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