Rec Object

Management Procedures return S4 objects of class Rec containing the management recommendations returned by an MP.

Rec objects have the following slots:

slotNames('Rec')
##  [1] "TAC"      "Effort"   "Spatial"  "Allocate" "LR5"      "LFR"     
##  [7] "HS"       "Rmaxlen"  "L5"       "LFS"      "Vmaxlen"  "Fdisc"   
## [13] "DR"       "Misc"

Information on the contents the Rec object is available in the help documentation or by typing class?Rec in the R console.

We demonstrate the Rec object by applying several management procedures of different types to the Cobia example Data object.

First, we use the Can function to determine which MPs can be run on the Cobia data:

MPs <- Can(Cobia, silent=TRUE)
MPtype(MPs)
##              MP      Type           Recs
## 1          curE     Input            TAE
## 2        curE75     Input            TAE
## 3     ItargetE1     Input            TAE
## 4     ItargetE2     Input            TAE
## 5     ItargetE3     Input            TAE
## 6     ItargetE4     Input            TAE
## 7     matlenlim     Input      Retention
## 8    matlenlim2     Input      Retention
## 9      MRnoreal     Input        Spatial
## 10       MRreal     Input        Spatial
## 11      slotlim     Input      Retention
## 12      AvC_MLL     Mixed TAC, Retention
## 13 Itarget1_MPA     Mixed   TAC, Spatial
## 14          AvC    Output            TAC
## 15        BK_CC    Output            TAC
## 16          CC1    Output            TAC
## 17          CC2    Output            TAC
## 18          CC3    Output            TAC
## 19          CC4    Output            TAC
## 20          CC5    Output            TAC
## 21         CurC    Output            TAC
## 22     GB_slope    Output            TAC
## 23          ICI    Output            TAC
## 24         ICI2    Output            TAC
## 25       Iratio    Output            TAC
## 26      Islope1    Output            TAC
## 27      Islope2    Output            TAC
## 28      Islope3    Output            TAC
## 29      Islope4    Output            TAC
## 30     Itarget1    Output            TAC
## 31     Itarget2    Output            TAC
## 32     Itarget3    Output            TAC
## 33     Itarget4    Output            TAC
## 34         SBT1    Output            TAC
## 35        SPmod    Output            TAC
## 36        SPMSY    Output            TAC
## 37      curEref Reference            TAE
## 38        NFref Reference            TAC

Next we apply several MPs in turn to the Cobia data.

Effort Control MP

Apply ItargetE1 MP to Cobia:

Rec <- ItargetE1(1, Cobia)
class(Rec)
## [1] "Rec"
## attr(,"package")
## [1] "MSEtool"
Rec
## Effort 
##   0.85

The MP returns an object of class Rec. By default, printing the Rec object to the console will only show the slots that are populated, in this case the Effort slot is the only slot that has been populated by the MP:

Rec@Effort
## [1] 0.85
Rec@TAC
## numeric(0)

Size Limit MP

Apply matlenlim MP which sets the length-at-retention to the length-at-maturity:

Rec <- matlenlim(1, Cobia)
Rec
##   LR5   LFR 
## 611.8 644.0

Catch Limit MP

Apply AvC MP which sets the TAC to the average historical catch:

Rec <- AvC(1, Cobia, reps=1000) 
Rec
## TAC (median) 
##     461.5988

Note that the TAC slot contains 1000 reps of the average catch (assuming a CV of 0.2, see ?AvC for details):

length(Rec@TAC)
## [1] 1000
hist(Rec@TAC)

Printing the Rec object returns the median of the 1000 reps:

Rec
## TAC (median) 
##     461.5988

Mixed MP (TAC and Spatial)

Apply Itarget1_MPA MP which sets a TAC and closes Area 1:

Rec <- Itarget1_MPA(1, Cobia, reps=1000) 
Rec
## TAC (median)       Area 1       Area 2 
##     572.0487       0.0000       1.0000