Because of the environment slot, this is not quite as straightforward as just saving the object. This also has option for file-backed Rasters.

saveSimList(sim, filename, fileBackend = 0, filebackedDir = NULL, envir, ...)

## Arguments

sim Either a simList or a character string of the name of a simList that can be found in envir. Using a character string will assign that object name to the saved simList, so when it is recovered it will be given that name. Character string with the path for saving simList Numeric. 0 means don't do anything with file backed rasters. Leave their file intact as is, in its place. 1 means save a copy of the file backed rasters in fileBackedDir. 2 means move all data in file-backed rasters to memory. This means that the objects will be part of the main RData file of the simList. Default is 0. Only used if fileBackend is 1. NULL, the default, or Character string. If NULL, then then the files will be copied to the directory: file.path(dirname(filename), "rasters"). A character string will be interpreted as a path to copy all rasters to. If sim is a character string, then this must be provided. It is the environment where the object named sim can be found. Passed to save, e.g., compression

## Value

A saved .RData file in filename location.

zipSimList