This function creates a SpatSimObj
for
spatial simulations. The object contains information about the
simulation window, the number of simulations to perform, and
lists of cells, Tissue1/Tissue2, holes, and spatial files.
Arguments
- window
An object of class
owin
representing the simulation window. IfNULL
, defaults to a rectangular window of size (0,10) in both x and y directions.- sims
The number of simulations to perform. If
NULL
or l ess than 1, defaults to 3.- cell_types
The number of cell types. Defaults to 1.
Value
A SpatSimObj
containing the simulation
window, the number of simulations to perform, and lists of cells,
Tissue1/Tissue2, holes, and spatial files.
Details
The simulation window is represented by an object of class
owin
, which specifies the extent and shape of the spatial
domain in which the simulations will be performed. If no window
is provided, the function creates a rectangular window of size
(0,10) in both x and y directions.
The sims
argument specifies the number of simulations to
perform. If it is set to NULL
or less than 1, the function
defaults to 3.
The cell_types
argument specifies the number of cell
types to include in the simulation. By default, the function
creates a single cell type, represented by an object of class
Cell
.
The SpatSimObj
is composed of the following classes:
A
Window
object of classowin
.An integer
Sims
specifying the number of simulations to perform.A list of
Cells
of classCell
.A
Tissue
object of classTissue1/Tissue2
, representing the Tissue1/Tissue2 components of the simulation.A
Holes
object of classHoles
, representing holes in the simulation.A list of
Spatial Files
containing any spatial data associated with the simulation.
Examples
CreateSimulationObject()
#> No `window` specified - defaulting to x (0, 10); y (0, 10)
#> Spatial Simulation object for 3 simulated images. Currently, there are:
#> Window: x (0,10); y (0,10)
#> 0 spatial point patterns
#> 0 tissue kernels
#> 0 hole kernels
#> 0 cell kernels for 1 cell types