survey: A method to generate observations of abundance at age.

surveyR Documentation

A method to generate observations of abundance at age.

Description

A method to generate observations of abundance at age.

Usage

survey(object, index, ...)

## S4 method for signature 'FLStock,FLIndex'
survey(
  object,
  index,
  sel = sel.pattern(index),
  ages = dimnames(index)$age,
  timing = mean(range(index, c("startf", "endf"))),
  index.q = index@index.q,
  stability = 1
)

## S4 method for signature 'FLStock,FLIndexBiomass'
survey(
  object,
  index,
  sel = sel.pattern(index),
  ages = ac(seq(range(index, c("min")), range(index, c("max")))),
  timing = mean(range(index, c("startf", "endf"))),
  catch.wt = stock.wt(object)[, dimnames(index)$year],
  index.q = index@index.q,
  stability = 1
)

## S4 method for signature 'FLStock,missing'
survey(
  object,
  sel = catch.sel(object),
  ages = dimnames(sel)$age,
  timing = 0.5,
  index.q = 1,
  biomass = FALSE,
  stability = 1
)

## S4 method for signature 'FLStock,FLIndices'
survey(object, index, ...)

Arguments

object

The object on which to draw the observation

Value

An FLQuant for the index of abundance

Author(s)

The FLR Team

See Also

FLComp

Examples

data(ple4)
data(ple4.index)
# CONSTRUCT a survey from stock and index
survey(ple4, ple4.index)
# Create FLIndexBiomass
ple4.biom <- as(ple4.index, "FLIndexBiomass")
survey(ple4, ple4.biom)
data(ple4)
survey(ple4)
survey(ple4, biomass=TRUE)

flr/FLCore documentation built on May 4, 2024, midnight