Learn R Programming

SiMRiv (version 1.0.7)

species: Create a species

Description

Creates a species, characterized by one or more behavioral states, to be simulated with function simulate.

Usage

species(states, trans = transitionMatrix(), name = ""
    , resistanceMap = NULL)

Value

An object of class species.

Arguments

states

a list of states characterizing the behavior of the species, or a single state, for simple movements

trans

a square state transition matrix, defining the probability of changing between states. For convenience, use the function transitionMatrix. Can be omitted if this species has a single-state movement.

name

the name of the species

resistanceMap

not used. Will be implemented in future versions.

Details

The rows and columns of the transition matrix correspond in the same order to the list of states. The matrix is not symmetric, and is read along the rows, i.e. the probability of changing from state 2 to state 1 is located in row 2, column 1; hence rows must sum to 1 but columns not.

See Also

simulate, perceptualRange, state, transitionMatrix, Arith-methods.

Examples

Run this code
## example from 'simulate'

## note: perceptual range radii and step lengths must be
## adequate to the raster resolution!

LevyWalker <- species(
	(state.RW() * 100 + 10) + (state.CRW(0.97) * 500 + 20)
, transitionMatrix(0.005, 0.001))

Run the code above in your browser using DataLab