modified_transition: Spatially-explicit transition function

View source: R/growth_transition_functions-class.R

modified_transitionR Documentation

Spatially-explicit transition function

Description

In the built-in modified_transition function, the values of fecundity and survival in local cell-based transition matrices are multiplied by values in the named spatial objects for each cell. The spatial objects can be rasters that are stored in the landscape object.

Usage

modified_transition(survival_layer = NULL, fecundity_layer = NULL)

Arguments

survival_layer

the name of a spatial layer in the landscape object used to modify survival values (i.e. non-zero values in rows other than the first).

fecundity_layer

the name of a spatial layer in the landscape object used to modify fecundity values (i.e. non-zero values in the first row).

Details

The behaviour of the function is to modify any non-zero values in the first row by the "fecundity_layer" and non-zero values in rows other than the first by the "survival_layer". This is irrespective of the type of matrix or any assumptions made by the user in creating the transition matrix. For example, if the transition matrix values include both the probabilities of surviving AND growing into the next stage, these can NOT be modified individually. This operation would require the use of a custom function - see the "Creating custom *steps* functions" vignette for more information.

Note, this function will not work if two-sex transition matrices are specified in a simulation. This function can be modified, however, to accommodate two-sex models - review the population_change function and see the "Creating custom *steps* functions" vignette for more information.

Value

An object of class transition_function

Examples


# Vital rates (survival and fecundity) modified based on habitat suitability.

## Not run: 
mod_fun <- modified_transition(survival_layer = "suitability", fecundity_layer = "suitability")

ls <- landscape(population = egk_pop, suitability = egk_hab, carrying_capacity = NULL)

pd <- population_dynamics(change = growth(egk_mat, transition_function = mod_fun))

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

## End(Not run)

skiptoniam/steps documentation built on Jan. 27, 2024, 1:49 p.m.