FLFishery.Rmd
The FLFishery package contains classes for modelling fishing activity. At the moment, it is mainly used by the FLasher package for performing projections. Other than the classes, the package currently has limited functionality.
A number of S4 classes are defined in the FLFishery
package, built around other classes in the FLR system. They represent different parts of the fishery system, all related to the activities of the fishing fleets we are modelling.
The FLCatch
class contains information on the removals from a single population a fleet is responsible for. Those catches are considered here to be a combination of landings and discards.
landings.n
Landings at age in numbers (1
)landings.wt
Mean weight at age in the landings (kg
)discards.n
Discards at age in numbers (1
)discards.wt
Mean weight at age in the discards (kg
)catch.sel
Combined total selectivity of the gear or gears used by this fleet (NA
)price
Price of landings by unit of weight (eur/kg
)The FLCatches
class is a list of named FLCatch
objects. Each FLCatch
in the list may catch from a different stock and have a different selectivity pattern etc.
It is possible to make FLCatch
and FLFishery
objects from an FLStock
. This can be useful if you are making these objects from the results of a stock assessment.
For example, to make an FLCatch
from an FLStock
:
## An object of class "FLCatch"
##
## Name: PLE
## Description: Plaice in IV. ICES WGNSSK 2018. FLAAP
## Quant: age
## Dims: age year unit season area iter
## 10 61 1 1 1 1
##
## Range: min max pgroup minyear maxyear
## 1 10 10 1957 2017
##
## landings.n : [ 10 61 1 1 1 1 ], units = 1000
## landings.wt : [ 10 61 1 1 1 1 ], units = kg
## discards.n : [ 10 61 1 1 1 1 ], units = 1000
## discards.wt : [ 10 61 1 1 1 1 ], units = kg
## catch.sel : [ 10 61 1 1 1 1 ], units =
## price : [ 10 61 1 1 1 1 ], units = NA
The catch.sel slot takes the selectivity pattern from the harvest slot of the FLStock
.
A similar method can be used to make an FLFishery
from an FLStock
.
# Load an FLStock data(ple4) # Make an FLFishery flf <- as(ple4, "FLFishery")
The FLCatches
slot of the FLFishery
can be accessed using the [[ ]] accessor:
summary(flf[[1]])
## An object of class "FLCatch"
##
## Name: PLE
## Description: Plaice in IV. ICES WGNSSK 2018. FLAAP
## Quant: age
## Dims: age year unit season area iter
## 10 61 1 1 1 1
##
## Range: min max pgroup minyear maxyear
## 1 10 10 1957 2017
##
## landings.n : [ 10 61 1 1 1 1 ], units = 1000
## landings.wt : [ 10 61 1 1 1 1 ], units = kg
## discards.n : [ 10 61 1 1 1 1 ], units = 1000
## discards.wt : [ 10 61 1 1 1 1 ], units = kg
## catch.sel : [ 10 61 1 1 1 1 ], units =
## price : [ 10 61 1 1 1 1 ], units = NA
The FLCatch
and FLFishery
classes both contain slots for storing basic economic information.
# catch, from ple4 ca <- as(ple4, "FLCatch")[, ac(2000:2005)] # price, as wt * 150, in EUR/t, as landings.n in # 1000 price(ca) <- (landings.wt(ca) * 150) * 1000 units(price(ca)) <- "EUR / t" # capacity, runif 19-28 boats cap <- FLQuant(floor(runif(5, 19, 28)), dimnames = list(year = 2000:2005), units = "boat") # effort, same number of days per year ef <- FLQuant(c(225, 212), dimnames = list(quant = c("day", "night"), year = 2000:2005), units = "d / boat") # hperiod, start 1st Jan, end 31st Dec hp <- FLQuant(c(0, 1), dimnames = list(quant = c("start", "end"), year = 2000:2005), units = "") # vcost vc <- FLQuant(c(1000, 10), dimnames = list(quant = c("fuel", "ice"), year = 2000:2005), units = "EUR / d") # fcost fc <- FLQuant(c(10000, 5000), dimnames = list(quant = c("license", "dock"), year = 2000:2005), units = "EUR / boat") # orevenue or <- FLQuant(200, dimnames = list(quant = c("tourism"), year = 2000:2005), units = "EUR / boat") # crewshare cs <- predictModel(model = ~fixed + share * lrevenue, params = FLPar(fixed = 300, share = 0.05, units = c("EUR", ""))) # FLFishery fis <- FLFishery(PLE = ca, SOL = ca, effort = ef, capacity = cap, hperiod = hp, vcost = vc, fcost = fc, orevenue = or, crewshare = cs)
FLFishery
at the FLFishery
issue page 1, or on the FLR mailing list.FLFishery
can always be installed using the devtools
package, by callinglibrary(devtools) install_github("iagomosqueira/FLFishery")