extract_spatial: Extract objects from a 'simulation_results' object

Description Usage Arguments Examples

Description

The simulation results object is a list of lists containing spatial (and other) objects and is organised by the following tree diagram:

Usage

1
2
3
4
5
6
7
8
extract_spatial(
  x,
  replicate = 1,
  timestep = 1,
  landscape_object = "population",
  stage = 1,
  misc = 1
)

Arguments

x

a simulation_results object

replicate

which replicate to extract from a simulation_results object

timestep

timestep(s) to extract from a simulation_results

landscape_object

which landscape object to extract from a simulation_results object - can be specified by name (e.g. "suitability") or index number

stage

which life-stage to extract from a simulation_results object - only used for 'population' components of the landscape object

misc

which misc object to extract from a simulation_results object - only used for additional spatial objects added to a landscape (e.g. disturbance layers)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
ls <- landscape(population = egk_pop, suitability = egk_hab, carrying_capacity = egk_k)

pd <- population_dynamics(change = growth(egk_mat),
                          dispersal = kernel_dispersal(max_distance = 2000,
                                        dispersal_kernel = exponential_dispersal_kernel(
                                          distance_decay = 1000)),
                          density_dependence = ceiling_density())

sim <- simulation(landscape = ls,
                  population_dynamics = pd,
                  habitat_dynamics = NULL,
                  timesteps = 20)

# Extract the population raster for the second life-stage in the first
# replicate and ninth timestep
extract_spatial(sim, timestep = 9, stage = 2)

## End(Not run)

steps documentation built on March 3, 2021, 5:06 p.m.