as_patch: Convert abundance to patch density

View source: R/misc.R

as_patchR Documentation

Convert abundance to patch density

Description

Convert abundance to patch density

Usage

as_patch(
  x,
  threshold = list(10000, c(2500, 5000, 7500, 10000))[[1]],
  form = c("index", "factor")[2]
)

Arguments

x

a vector of abundances

threshold

numeric boundaries defining levels of patchiness from low to high. Values in x below the lowest threshold are considered "no-patch"

form

character, one of 'index' of 'factor' to control the output type in either case NAs are propagated.

Value

numeric indices into threshold, possibly as factors. Zero means no patch.


BigelowLab/calanusthreshold documentation built on May 12, 2022, 5:06 a.m.