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. Slots in this class can store most relevant data, such as catch and weight by quant. In can also be updated to include quantities estimated by stock assessment models, such as fishing mortality and numbers at quant.

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 update)
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 number of standard plots for an FLStock. Five plots styles can be specified, by using the type parameter. If type="composite", a three-section plots is created showing the time series of catch, the differences between measured and calculated catches, if any, and catch-at-quant. This is the default plot when no type is specified. "catch" creates a plot of the logarithm of the ratios of succesive catches of each cohort. The log-ratios belonging to the same cohort are joined with a line.

"Wt" creates a plot with the mean weigth-at-quant, a smooth line, calculated with the lowess function, is added for each quant. "Wtres" creates a plot of the residuals (the log-ratio of the smooth line fitted weigth-at-quant and observed values). "ts" creates a triple plot, with the time series of Recruitment, Spawning Stock Biomass (SSB) and predicted Fishing mortality (Fhat).

project
signature(obj = "FLStock", control = "FLSTF.control"): ...
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.
catch
signature(object = "FLStock"): catch provides a mechanism for estimating catch slots from landings and discards. Three options are available, to estimate catch.n from landings.n and discards.n (slot="n"), to estimate catch weights, catch.wt, as a weighted averquant of the discards and landings weights ate quant (slot="wt"), and to calculate the catch time series from the previous two (slot="all").
landings, discards
signature(object = "FLStock"): These two methods estimate landings and discards time series respectively, from the corresponding weights and numbers.
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.
setunits
signature(obj = "FLStock"): Sets the units of all FLQuant slots in an FLStock object.
transform
signature(obj = "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...", iniFLQuant=catch.n)

[Package FLCore version 1.1 Index]