Learn R Programming

scSpatialSIM (version 0.1.3.4)

UpdateSimulationWindow: Update the simulation window in a SpatSimObj

Description

This function updates the simulation window of a SpatSimObj by replacing the existing window with a new one.

Usage

UpdateSimulationWindow(sim_object, window = NULL)

Value

The updated SpatSimObj object

Arguments

sim_object

A SpatSimObj object

window

A new owin object representing the updated simulation window

Details

The UpdateSimulationWindow() function checks that the input sim_object is of class 'SpatSimObj', that the input window is not null and is of class 'owin'. If these checks pass, the function updates the simulation window in the input sim_object and returns the updated SpatSimObj object.

See Also

CreateSimulationObject

Examples

Run this code
# Create a simulation object
sim_obj <- CreateSimulationObject()

# Update the simulation window
new_window <- spatstat.geom::owin(c(0, 5), c(0, 5))
updated_sim_obj <- UpdateSimulationWindow(sim_obj, window = new_window)

Run the code above in your browser using DataLab