Disp.Matrix: Create displacement matrices

View source: R/Disp_Matrix.R

Disp.MatrixR Documentation

Create displacement matrices

Description

Takes a value and then generates a decay-matrix for use in displacement assessments

Usage

Disp.Matrix(
  Species,
  Season,
  MSP,
  MSPlowerCI = NA,
  MSPupperCI = NA,
  writeout = "none",
  outdir = NULL,
  rounding = "round",
  digits = 0
)

Arguments

Species

a character string. Name of the species.

Season

a character string. The season the matrix applies to.

MSP

a numeric value. The mean seasonal peak or population estimate to generate the matrix from.

MSPlowerCI

a numeric value. The mean seasonal peak lower CI value which will be copied into output as (lowerCI - upperCI).

MSPupperCI

a numeric value. The mean seasonal peak upper CI value which will be copied into output as (lowerCI - upperCI).

writeout

If "none" (default) then no output is written to outdir, if "excel" the .xlsx file is output, if "word" then .docx file is output.

outdir

a character string. The output directory for the xlsx file.

rounding

a character string. Default is "round". Change to "ceiling" if you require outputs rounded up to whole birds.

digits

a numeric value. Set the number of digits you desire for outputs to be rounded to. Note: when using rounding = "ceiling" all outputs will be rounded to whole birds regardless.

Value

A matrix. The displacement matrix for the species and season of interest

Examples

Kittiwake_Breeding <- Disp.Matrix("Kittiwake", "Breeding", MSP=250)

#with lower and upper CI
Kittiwake_Breeding <- Disp.Matrix("Kittiwake", "Breeding", MSP=250, MSPlowerCI=150, MSPupperCI=275)

#with lower and upper CI and excel print out
Disp.Matrix("Kittiwake", "Breeding", MSP=250, MSPlowerCI=150, MSPupperCI=275, writeout="excel", outdir="C:/Temp/")

#with lower and upper CI and word print out
Disp.Matrix("Kittiwake", "Breeding", MSP=250, MSPlowerCI=150, MSPupperCI=275, writeout="word", outdir="C:/Temp/")

#with lower and upper CI and word print out and set number of digits
Disp.Matrix("Kittiwake", "Breeding", MSP=250, MSPlowerCI=150, MSPupperCI=275, writeout="word", digits = 2, outdir="C:/Temp/")

HiDef-Aerial-Surveying/HiDEF documentation built on Nov. 21, 2023, 5:54 a.m.