This function updates the simulation window of a SpatSimObj by replacing
the existing window with a new one.
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.
Examples
# Create a simulation object
sim_obj <- CreateSimulationObject()
#> No `window` specified - defaulting to x (0, 10); y (0, 10)
# Update the simulation window
new_window <- spatstat.geom::owin(c(0, 5), c(0, 5))
updated_sim_obj <- UpdateSimulationWindow(sim_obj, window = new_window)