extractBRP: Extracts reference points (specifically Bpa, Blim, Bmsy, Fpa,...

View source: R/Auxiliary_Functions_Data_Manipulation.R

extractBRPR Documentation

Extracts reference points (specifically Bpa, Blim, Bmsy, Fpa, Flim and Fmsy) from advice.ctrl object, If not available, then values are set to NA.

Description

The output can be used for the brp argument of bioSum function.

Usage

extractBRP(advice.ctrl, stkn, Btarget = NULL, Ftarget = NULL)

Arguments

advice.ctrl

A list with advice controls as the FLBEIA function argument advice.ctrl.

stkn

Names of the stocks.

Btarget

Named vector with the name of the target biological reference point for each element in stkn. Default "Bmsy".

Ftarget

Named vector with the name of the target fishing mortality reference point for each element in stkn. Default "Fmsy".

Value

A data frame with columns stock, iter and one colum per reference point with the value of the biological reference points per stock and iteration. The used reference points are Bpa, Blim, Bmsy, Fpa, Flim and Fmsy.

See Also

bioSum

Examples

## Not run: 

library(FLBEIA)

data(one)
extractBRP(oneAdvC, stkn = names(oneBio))

data(oneIt)
extractBRP(oneItAdvC, stkn = names(oneItBio))

data(multi)
extractBRP(multiAdvC, stkn = names(multiBio))
                          
# setting targets different to Bmsy and Fmsy

extractBRP(oneAdvC, stkn = names(oneBio),
           Btarget=setNames("Btrigger","stk1"), Ftarget=setNames("Ftrigger","stk1"))

Btarget <- setNames(c("Btrigger","Bmsy"),names(oneBio))
Ftarget <- setNames(c("Ftrigger","Fmsy"),names(oneBio))

extractBRP(multiAdvC, stkn = names(multiBio))


## End(Not run)

flr/FLBEIA documentation built on Feb. 22, 2024, 1:36 a.m.