FLStock-class {FLCore} | R Documentation |
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 can be created by calls to the constructor function FLStock()
or by new("FLStock", ...)
.
name
:desc
:range
:catch
:catch.n
:catch.wt
:update
)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 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).
signature(obj = "FLStock", control = "FLSTF.control")
: ... 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")
: 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").signature(object = "FLStock"):
These two methods estimate
landings and discards time series respectively, from the corresponding weights and numbers.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")
: Sets the units of all FLQuant slots in an
FLStock object.signature(obj = "FLStock")
: Alters the content of individual slots in
a FLStock object. Only the data is altered, not dimnames.signature(obj = "FLStock")
: Outputs a new FLStock using the input specified as base with the options changed as specified.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...", iniFLQuant=catch.n)