FLStock-class {FLCore} | R Documentation |
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 can be created by calls to the constructor function FLStock()
or by new("FLStock", ...)
.
name
:desc
:range
:catch
:catch.n
:catch.wt
:computeCatch
)discards
:discards.n
:discards.wt
:landings
:landings.n
:landings.wt
:stock
:stock.n
:stock.wt
:m
:mat
:harvest
:harvest.spwn
:m.spwn
: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.
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.
signature(object = "FLStock")
:
Returns an FLQuant with the calculated aggregated slots for landings and discards
respectively from numbers and mean weights.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.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.signature(obj = "FLStock")
: Computes, parameterically or
non-parametrically, the SSB-per-unit-recruit at the FLQuant resolutioni and
returns an object of class FLQuant.signature(obj = "FLStock")
: Sets the units of all FLQuant slots in an
FLStock object.signature(`_data` = "FLStock")
: Alters the content of individual
slots in a FLStock object. Only the data is altered, not dimnames.signature(x = "FLStock")
: Creates a data.frame object storing all information present in an FLStock one. A column named slot
contains the name of the slot. See as.data.frame
signature(object = "FLStock")
: Applies a function to all FLQuant slots in the object. If the result of the function is of class FLQuant, an FLStock object with the altered slots is returned. Otherwise a list with elements named after each slot is obtained.signature(obj = "FLStock")
: Outputs a new FLStock using the input specified as base with the options changed as specified.signature(obj = "FLStock")
: Returns a 'FLSR' object created from a 'FLStock' object.signature(obj = "FLStock", "list", "function")
: Usual apply function.signature(obj = "FLStock", "character")
: Changes the units of the harvest FLQuant slot.FLR Team
# 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)