FLStock-class {FLCore}R Documentation

Class FLStock for fish stock data and modelling output

Description

The FLStock class is a data representation of a fish stock, that is, the scientific perception of a natural population. Slots in this class store most of the relevant data, such as catch (as landings, discards and total catch), or mean weight in the catch by quant (age, length or other). In can also be updated to include quantities estimated by stock assessment models, such as fishing mortality and abundance.

Catch and abundance slots store three related quantities: numbers by quant, mean weights by quant, and total biomass agreggated along the quant dimension. Subsequently, all slots of class FLQuant-class are of the same dimensions, except for the agreggated slots (catch, landings, discards and stock) that have lenght=1 on the first dimension.

The harvest slot holds the estimated values of fishing mortality. Use of the units attribute in very important in this slot, as its content might refer to fishing mortality (F) or harvest rate. Many methods will only work if the expected units are specified.

Objects from the Class

Objects can be created by calls to the constructor function FLStock() or by new("FLStock", ...).

Slots

name:
A character vector with the name of the stock
desc:
A description of the stock
range:
Year and quant range, and specified plus group quant (if required). A vector of length 5.
catch:
An FLQuant holding the total catch (landings plus discards) in weight for all quants
catch.n:
Catch in numbers by quant
catch.wt:
Weight at quant in the catch, usually obtained from those for landings and discards (see computeCatch)
discards:
An FLQuant holding the total discards in weight for all quants
discards.n:
Discards by quant in numbers
discards.wt:
Weight at quant of the discards
landings:
An FLQuant of the total landings for all quants
landings.n:
Landings in numbers by quant
landings.wt:
Weight at quant of landings
stock:
Stock weight for all quants. Usually obtained from an assessment method
stock.n:
Stock numbers by quant, output from an quant-structured assessment method
stock.wt:
Weights at quant in the stock
m:
Natural mortality by quant
mat:
Maturity by quant, usually as a proportion
harvest:
Harvest mode rate by quant
harvest.spwn:
Fraction of the harvest mode ocurring before spawning
m.spwn:
Fraction of the natural mortality ocurring before spawning

Methods

plot
signature(x = "FLStock", y = "missing"): Generates a standard exploratory plot for an FLStock. The time series of catch, landings and discards is presented, conditioned on units, areas or season when relevant.
summary
signature(object = "FLStock"): Prints a detailed summary of the slots in the object, indicating whether they contain any data and the number of years, quants, areas, units and seasons specified.
computeLandings, computeDiscards
signature(object = "FLStock"): Returns an FLQuant with the calculated aggregated slots for landings and discards respectively from numbers and mean weights.
computeCatch
signature(object = "FLStock"): Computes the total catch in weigth from catch numbers (catch.n) and mean weight in the catch (catch.wt), when slot="catch". If slot="n" or slot="wt", catch numbers or mean weight in the catch will be calculated from landings and discards. Finally, if slot="catch", all three calculations will be performed and an object of class FLQuants-class will be returned.
ssb
signature(object = "FLStock"): This creates an aggregated object of class FLQuant-class containg the SSB, calculated depending on the relevant units in the harvest slot.
ssbpurec
signature(obj = "FLStock"): Computes, parameterically or non-parametrically, the SSB-per-unit-recruit at the FLQuant resolutioni and returns an object of class FLQuant.
setunits
signature(obj = "FLStock"): Sets the units of all FLQuant slots in an FLStock object.
transform
signature(`_data` = "FLStock"): Alters the content of individual slots in a FLStock object. Only the data is altered, not dimnames.
as.FLStock
signature(obj = "FLStock"): Outputs a new FLStock using the input specified as base with the options changed as specified.
apply
signature(obj = "FLStock", "list", "function"): Usual apply function.
harvest<-
signature(obj = "FLStock", "character"): Changes the units of the harvest FLQuant slot.

Author(s)

FLR Team

See Also

as.FLStock, FLQuant-class

Examples

# Create a new empty stock, giving a name and desc.
my.ple <- FLStock(name = "plaice", desc = "Just an example...")
summary(my.ple)

# Create an FLStock with the same dimensions as the FLQuant object catch.
catch.n <- FLQuant(array(round(rnorm(120, 5000,500)), dim=c(12,10,1,1,1),
          dimnames=list(quant=as.character(1:12), year=as.character(c(1991:2000)),
          unit="all", season="all", area="all")))
my.stock <- FLStock(name = "My Stock", desc = "Just an example...", catch.n=catch.n)

[Package FLCore version 1.3-3 Index]