powered by
Generate a matrix of straying proportions within a metapopulation. Based on Eq. 2 in Cooper and Mangel (1999).
generate_straying_matrix(n_pop, stray_fraction, stray_decay_rate)
Number of subpopulations.
Fraction of individuals that stray from a given subpopulation.
Exponential rate that straying decays with distance between subpopulations.
Cooper, A.B. and Mangel, M. 1999. The dangers of ignoring metapopulation structure for the conservation of salmonids. Fish. Bull. 97(2): 213-226.
# 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