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

Description Usage Arguments Details Value Examples

View source: R/habitat-class.R

Description

A habitat object is used to store spatially-explicit information on habitat suitability and the carrying_capacity of a landscape.

Usage

1
2
3
4
5
6
habitat(habitat_suitability, carrying_capacity, misc = NULL, ...)

is.habitat(x)

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

Arguments

habitat_suitability

A raster layer or stack containing habitat suitability values for all cells in a landscape. Note, using a raster stack assumes that the user has provided a habitat layer for each intended timestep in a simulation.

carrying_capacity

A raster layer specifying carrying capacity values for all cells in a landscape.

misc

Miscellaneous inputs used to modify the habitat object in a simulation. Note, this is intended to store objects that are accessed and used to modify the habitat with a custom developed habitat dynamic function.

...

Further arguments passed to or from other methods.

x

A habitat object.

Details

A habitat object is a sub-component of a state object and is modified in each timestep of a simulation. During a simulation, a habitat object tracks changes in habitat suitability or carrying capacity based on habitat dynamic functions selected or created by the user.

Value

An object of class habitat

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(steps)
library(raster)

# Construct the habitat object
hab <- habitat(habitat_suitability = egk_hab, carrying_capacity = egk_k)

# Test if object is of the type 'habitat'
is.habitat(test_habitat)

# Print information about the 'habitat' object
print(test_habitat)

skiptoniam/dlmpr documentation built on Sept. 26, 2018, 3:11 p.m.