FLStock | R Documentation |
A class for modelling a fish stock.
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, ...)
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 |
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) .
Total catch weight (FLQuant
).
Catch numbers (FLQuant
).
Mean catch weights (FLQuant
).
Total discards weight (FLQuant
).
Discard numbers (FLQuant
).
Mean discard weights (FLQuant
).
Total landings weight (FLQuant
).
Landing numbers (FLQuant
).
Landing weights (FLQuant
).
Total stock weight (FLQuant
).
Stock numbers (FLQuant
).
Mean stock weights (FLQuant
).
Natural mortality (FLQuant
).
Proportion mature (FLQuant
).
Harvest rate or fishing mortality. The units of this slot
should be set to 'hr' or 'f' accordingly (FLQuant
).
Proportion of harvest/fishing mortality before
spawning (FLQuant
).
Proportion of natural mortality before spawning
(FLQuant
).
Name of the stock (character
).
Description of the stock (character
).
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
).
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.
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.
The FLR Team
[, [<-, 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
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.