Skip to contents

This function automates construction and analysis of a spatial population matrix model, from construction of the vec-permutation matrix to plotting. THe user provides a `path` and `filename` for a spmm formatted Excel Workbook (xlsx).

Future plans include a "report" option that would include an RMarkdown (.Rmd) and Word Document (.docx) as outputs. Additionally, I am exploring the ability to "update" a spmm as a convenience function.

Usage

auto.spmm(
  path,
  filename,
  ddf = NA,
  H = NA,
  D = NA,
  plot = FALSE,
  ylabs = NA,
  xlabs = NA
)

Arguments

path

path to xlsx workbook

filename

name of xlsx workbook

ddf

Density-dependent function parameters (see `?spmm.ddf.params`)

H

Harvest mortality. Currently additive mortality assumed.

D

A list of three vectors. The first two, `from` and `to`, identify where deterrence of movement is made. The third, `d`, contains the proportions by which movement is deterred. Currently deterrence is assumed equal for all stages.

plot

optional; output plots from `auto.spmm`?

ylabs

optional; labels for y-axis labels

xlabs

optional; labels for x-axis labels

Note

Workbook should follow template found in extdata. Objects can be assigned from the list using the unpacking / destructuring assignment " from the zeallot package. (metapopbio currently lists zeallot as a dependency).

References

Schauberger P, Walker A (2022). openxlsx: Read, Write and Edit xlsx Files. https://ycphs.github.io/openxlsx/index.html, https://github.com/ycphs/openxlsx.