Get spatial inputs or outputs from one or more SyncroSim scenarios.
datasheetRaster(
ssimObject,
datasheet,
column = NULL,
scenario = NULL,
iteration = NULL,
timestep = NULL,
subset = NULL,
forceElements = FALSE
)# S4 method for character
datasheetRaster(
ssimObject,
datasheet,
column = NULL,
scenario = NULL,
iteration = NULL,
timestep = NULL,
subset = NULL,
forceElements = FALSE
)
# S4 method for list
datasheetRaster(
ssimObject,
datasheet,
column = NULL,
scenario = NULL,
iteration = NULL,
timestep = NULL,
subset = NULL,
forceElements = FALSE
)
# S4 method for SsimObject
datasheetRaster(
ssimObject,
datasheet,
column = NULL,
scenario = NULL,
iteration = NULL,
timestep = NULL,
subset = NULL,
forceElements = FALSE
)
# S4 method for Scenario
datasheetRaster(
ssimObject,
datasheet,
column = NULL,
scenario = NULL,
iteration = NULL,
timestep = NULL,
subset = NULL,
forceElements = FALSE
)
SsimLibrary/Project/Scenario or list of Scenarios. If SsimLibrary/Project, then scenario argument is required.
character string. The name of the datasheet containing the raster data.
character string. The name of the column in the datasheet containing the filenames for raster data. If NULL then use the first column that contains raster filenames.
character string, integer, or vector of these. The scenarios to include. Required if ssimObject is an SsimLibrary/Project, ignored if ssimObject is a list of Scenarios.
integer, character string, or vector of integer/character strings. Iteration(s) to include. If NULL then all iterations are included. If no Iteration column in the datasheet, then ignored.
integer, character string, or vector of integer/character string. Timestep(s) to include. If NULL then all timesteps are included. If no Timestep column in the datasheet, then ignored.
logical expression indicating datasheet rows to return. e.g. expression(grepl("Ts0001",Filename,fixed=T)). See subset() for details.
logical. If TRUE then returns a single raster as a RasterStack; otherwise returns a single raster as a RasterLayer directly.
A RasterLayer, RasterStack or RasterBrick object. See raster package documentation for details.
The names() of the returned raster stack contain metadata. For datasheets without Filename this is: paste0(<datasheet name>,".Scn",<scenario id>,".",<tif name>) For datasheets containing Filename this is: paste0(<datasheet name>,".Scn",<scenario id>,".It",<iteration>,".Ts",<timestep>)
# NOT RUN {
## Not run as it would require a result scenario (long runtime)
datasheetRaster(myResult,
datasheet = "OutputSpatialState",
subset = expression(grepl("Ts0001", Filename, fixed = TRUE))
)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab