Learn R Programming

metafolio (version 0.1.1)

generate_straying_matrix: Generate a matrix of straying proportions within a metapopulation

Description

Generate a matrix of straying proportions within a metapopulation. Based on Eq. 2 in Cooper and Mangel (1999).

Usage

generate_straying_matrix(n_pop, stray_fraction, stray_decay_rate)

Arguments

n_pop

Number of subpopulations.

stray_fraction

Fraction of individuals that stray from a given subpopulation.

stray_decay_rate

Exponential rate that straying decays with distance between subpopulations.

References

Cooper, A.B. and Mangel, M. 1999. The dangers of ignoring metapopulation structure for the conservation of salmonids. Fish. Bull. 97(2): 213-226.

Examples

Run this code
# NOT RUN {
x <- generate_straying_matrix(10, 0.01, 0.3)
image(x, col = rev(heat.colors(12)))
# }

Run the code above in your browser using DataLab