demography_dynamics: Modify the demography in a state object.

Description Usage Arguments Details Value Examples

View source: R/demography_dynamics-class.R

Description

A demography_dynamics object is used to modify life-stage transition matrices - for example, adding stochasticity.

Usage

1
2
3
4
5
6
demography_dynamics(...)

is.demography_dynamics(x)

## S3 method for class 'demography_dynamics'
print(x, ...)

Arguments

...

Functions that operates on a state object to change demography at specified timesteps. A user may enter custom functions or select pre-defined modules - see examples.

x

A demography_dynamics object to print or test.

Details

A demography_dynamics object is a sub-component of a dynamics object and is executed in each timestep of a simulation. Note, some dynamics functions can be executed at non-regular intervals (i.e. only timesteps explicitly defined by the user). The build_demography_dynamics function is used to construct a demography dynamics object consisting of several demographic dynamics functions and their associated parameters. These functions specify how the demography in the state object will be modified throughout a simulation.

Value

An object of class demography_dynamics

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library(steps)
library(raster)

# Select existing dynamic functions to be run on the demography
# in a simulation and specify input parameters: 
env_stoch <- environmental_stochasticity(transition_matrix = egk_mat,
                                         stochasticity = 0.5)
                                              
dem_dens <- density_dependence(transition_matrix = egk_mat)

# Construct a demography dynamics object
dem_dynamics <- demography_dynamics(env_stoch, dem_dens)

# Test if object is of the type 'demography_dynamics'
is.demography_dynamics(test_demo_dynamics)

# Print details about the 'demography_dynamics' object
print(test_demo_dynamics)

skiptoniam/steps documentation built on Sept. 26, 2018, 5:18 p.m.