demography: Create a demography object to use in a state object.

Description Usage Arguments Details Value Examples

View source: R/demography-class.R

Description

A demography object contains information on how population demographics change in space and time.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
demography(transition_matrix, scale = "global",
  habitat_suitability = NULL, misc = NULL, ...)

is.demography(x)

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

## S3 method for class 'demography'
summary(object, ...)

## S3 method for class 'demography'
plot(x, ...)

Arguments

transition_matrix

A symmetrical age-based (Leslie) or stage-based population structure matrix.

scale

The scale to which the transition matrix is applied - either 'global' for a landscape-wide application or 'local' for a grid cell-based applications. The default value is 'global'.

habitat_suitability

A spatial raster (grid cell-based) layer that is of the appropriate extent and resolution for the simulation (required if 'local' scale is specified).

misc

Miscellaneous inputs used to modify the demography object in a simulation. Note, this is where the user may store objects that are called upon and modified by demographic dynamic functions (also created by the user).

...

Further arguments passed to or from other methods.

x

A demography object (test or print).

object

A demography object (summary).

Details

A demography object is a sub-component of a state object and is modified in each timestep of a simulation. During a simulation, a demography object tracks changes in life-stage matrices (either global for the entire landscape or local to grid cells) based on demographic dynamic functions selected or created by the user.

Value

An object of class demography

Examples

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

# Construct the demography object
dem <- demography(transition_matrix = egk_mat)

# Test if object is of the type 'demography'
is.demography(test_demography)

# Print information about the 'demography' object
print(test_demography)

# Print a summary of 'demography' object attributes
summary(test_demography)

# Plot the 'demography' object
plot(test_demography)

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