FLCatch | R Documentation |
Make an FLCatch object.
Catch data for a single species or stock unit is handled by the
FLCatch
class. Data is separated as landings and discards by age, in
numbers, with the corresponding mean weights at age.
FLCatch(object, ...)
catch.sel(object, ...) <- value
discards.ratio(object, ...)
lrevenue(object, ...)
## S4 method for signature 'FLCatch'
landings.n(object)
## S4 replacement method for signature 'FLCatch,numeric'
landings.n(object) <- value
## S4 replacement method for signature 'FLCatch,numeric'
landings.wt(object) <- value
## S4 replacement method for signature 'FLCatch,numeric'
discards.n(object) <- value
## S4 replacement method for signature 'FLCatch,numeric'
discards.wt(object) <- value
## S4 replacement method for signature 'FLCatch,numeric'
catch.sel(object) <- value
## S4 replacement method for signature 'FLCatch,numeric'
price(object) <- value
## S4 replacement method for signature 'FLCatch,numeric'
catch.q(object) <- value
## S4 method for signature 'FLCatch'
landings(object)
## S4 method for signature 'FLCatch'
discards(object)
## S4 method for signature 'FLCatch'
catch(object)
## S4 method for signature 'FLCatch'
landings.n(object)
## S4 method for signature 'FLCatch'
discards.n(object)
## S4 method for signature 'FLCatch'
catch.n(object)
## S4 method for signature 'FLCatch'
catch.wt(object)
## S4 method for signature 'FLQuant'
FLCatch(object, ...)
## S4 method for signature 'missing'
FLCatch(object, ...)
## S4 method for signature 'FLCatch'
lrevenue(object)
## S4 method for signature 'FLCatch'
landings.sel(object)
## S4 method for signature 'FLCatch'
discards.sel(object)
## S4 method for signature 'FLCatch'
discards.ratio(object)
## S4 method for signature 'FLCatch,missing'
plot(x, y, ...)
object |
Either an FLQuant (to determine the size of the FLQuant slots) or missing |
... |
Other things |
value |
Replacement value |
x |
FLCatch |
y |
missing |
Make an FLCatch object.
This is class is used inside FLFishery
to store the catches of
a single stock or species caught by that fleet.
An FLCatch object
Parameters of the catchability function, (FLPar
).
Selectivity at age as proportions over fully-selected
ages, (FLQuant
).
Description of the data contents and origin, (character
).
Discards at age in numbers, (FLQuant
).
Mean weight-at-age in the discards, (FLQuant
).
Name of the object, e.g. species or stock code, (character
).
Landings at age in numbers, (FLQuant
).
Mean weight-at-age in the landings, (FLQuant
).
Mean price by age per unit of weight, (FLQuant
).
Ranges of age and years, plusgroup, (numeric
).
All FLQuant
slots must share
dimensions 2 to 5.
iter
dim of length 1 or NThe 6th dimension in all
FLQuant
and FLPar
slots must be 1 or N, where N is the
same value for the whole object.
All FLQuant
slots must share
dimensions 2 to 5.
You can inspect the class validity function by using
getValidity(getClassDef('FLCatch'))
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.
Methods exist for various calculations based on values stored in the class:
Total landings as sum on 'age' of landings.n
times landings.wt
.
Total discards as sum on 'age' of discards.n
times discards.wt
.
Selectivity at age in the landings as proportions
over fully-selected ages, (FLQuant
).
Selectivity at age in the discards as proportions
over fully-selected ages, (FLQuant
).
Catch at age in numbers as landings.n
plus
discards.n
.
Weighted average of landings.wt
and
discards.wt
.
Total catch as sum of landings
and
discards
.
Proportion at age of discards in catch.
Standard plot for the FLCatch class.
The FLR Team
Iago Mosqueira, EC JRC.
FLComp
FLCatches, FLFishery
data(ple4)
# EXTRACT data from FLCore ple4, fake prices
fca <- FLCatch(name='PLE', desc='All NS PLE catches',
landings.n=landings.n(ple4), landings.wt=landings.wt(ple4),
discards.n=discards.n(ple4), discards.wt=discards.wt(ple4),
price=landings.wt(ple4) * 23, catch.q=FLPar(q=1),
catch.sel=catch.sel(ple4))
# Calculations
landings(fca)
catch.n(fca)
catch.wt(fca)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.