FLStock: Class FLStock

FLStockR Documentation

Class FLStock

Description

A class for modelling a fish stock.

Usage

FLStock(object, ...)

## S4 method for signature 'FLQuant'
FLStock(object, plusgroup = dims(object)$max, ...)

## S4 method for signature 'missing'
FLStock(object, ...)

## S4 method for signature 'FLQuants'
FLStock(object, ...)

Arguments

object

FLQuant object used for sizing

...

Other objects to be assigned by name to the class slots

plusgroup

Plusgroup age, to be stored in range

Details

The FLStock object contains a representation of a fish stock as constructed for the purposes of scientific analysis and advice. This includes information on removals (i.e. catches, landings and discards), maturity, natural mortality and the results of an analytical assessment (i.e. estimates of abundance and removal rates) .

Slots

catch

Total catch weight (FLQuant).

catch.n

Catch numbers (FLQuant).

catch.wt

Mean catch weights (FLQuant).

discards

Total discards weight (FLQuant).

discards.n

Discard numbers (FLQuant).

discards.wt

Mean discard weights (FLQuant).

landings

Total landings weight (FLQuant).

landings.n

Landing numbers (FLQuant).

landings.wt

Landing weights (FLQuant).

stock

Total stock weight (FLQuant).

stock.n

Stock numbers (FLQuant).

stock.wt

Mean stock weights (FLQuant).

m

Natural mortality (FLQuant).

mat

Proportion mature (FLQuant).

harvest

Harvest rate or fishing mortality. The units of this slot should be set to 'hr' or 'f' accordingly (FLQuant).

harvest.spwn

Proportion of harvest/fishing mortality before spawning (FLQuant).

m.spwn

Proportion of natural mortality before spawning (FLQuant).

name

Name of the stock (character).

desc

Description of the stock (character).

range

Named numeric vector containing the quant and year ranges, the plusgroup and the quant range that the average fishing mortality should be calculated over (numeric).

Accessors

All slots in the class have accessor and replacement methods defined that allow retrieving and substituting individual slots.

The values passed for replacement need to be of the class of that slot. A numeric vector can also be used when replacing FLQuant slots, and the vector will be used to substitute the values in the slot, but not its other attributes.

Constructor

A construction method exists for this class that can take named arguments for any of its slots. All slots are then created to match the requirements of the class validity. If an unnamed FLQuant object is provided, this is used for sizing but not stored in any slot.

Author(s)

The FLR Team

See Also

[, [<-, as.FLBiol, as.FLSR, catch, catch<-, catch.n, catch.n<-, catch.wt, catch.wt<-, coerce, computeCatch, computeDiscards, computeLandings, discards, discards<-, discards.n, discards.n<-, discards.wt, discards.wt<-, harvest, harvest<-, harvest.spwn, landings, landings<-, landings.n, landings.n<-, landings.wt, landings.wt<-, m, m<-, mat, m.spwn, plot, ssb, ssbpurec, stock, stock.n, stock.wt, trim, FLComp

Examples


data(ple4)
summary(ple4)

# get the landings slot and assign values to it
  landings(ple4)
  landings(ple4) <- apply(landings.n(ple4)*landings.wt(ple4),2,sum)

# perform similar calculation as the preceding apply function
  discards(ple4) <- computeDiscards(ple4)
  catch(ple4) <- computeCatch(ple4)
  catch(ple4) <- computeCatch(ple4, slot="all")

# set the units of the harvest slot of an FLStock object
  harvest(ple4) <- 'f'

# subset and trim the FLStock
  ple4[,1]
  trim(ple4, age=2:6, year=1980:1990)

# Calculate SSB, and SSB per recruit at zero fishing mortality
  ssb(ple4)
  ssbpurec(ple4)

# Coerce an FLStock to an FLBiol
  biol <- as(ple4, "FLBiol")

# Initialise an FLSR object from an FLStock
  flsr <- as.FLSR(ple4)


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