This function aggregates the output of a run over the entire output, i.e., all of the patches. It writes the output one level above the folder pointed to by readDir, if writeDir is NULL. Output consists of 2 csv files, one for males and one for females, "...M_LandscapeAgg_Run...csv".
aggregateOutput(readDir, writeDir=NULL)
Arguments
readDir: Directory where output was written to
writeDir: Directory to write output to. Default is one level above readDir
Examples
## Not run:# This assumes user has run MGDrivE and output is in fPath.# See vignette for examples on how to run MGDrivE# read/write dirsfPath <-"folder/containing/output"oPath <-"folder/to/write/stuff"# first, split output by patch and aggregate females by mate genotype# remember, cube is for example and changes with simulation# landscape aggregation will work if females are not aggregated, but it's slowercube <- cubeMendelian()splitOutput(readDir = fPath, writeDir =NULL, remFile =TRUE)aggregateFemales(readDir= fPath, writeDi =NULL, genotypes = cube$genotypesID, remFile =TRUE)# aggregate mosquitoes over entire landscape# no return valueaggregateOutput(readDir = fPath, writeDir =NULL)## End(Not run)