getaav: getaav calculates annual absolute variation in catch

View source: R/cpuefuncs.r

getaavR Documentation

getaav calculates annual absolute variation in catch

Description

getaav calculates the annual absolute change in catch for an input vector of catches, which could be across a series of years or even across different spatial units for a single year (an unusual use). The equation used is aav = 100 x sum(|Ct - Ct-1|)/(sum(Ct).

Usage

getaav(invect, narm = TRUE)

Arguments

invect

a vector of catches

narm

boolean, should NAs be removed? If not then getaav will return an NA. Default = TRUE

Value

a single scalar value the AAV of the input catches

Examples

  catch <- c(1,2,3,4,5,4,3,2,1)
  getaav(catch)  # should equal 0.32

haddonm/rforcpue documentation built on Oct. 12, 2024, 11:55 p.m.