brp: Fit an FLBRP object

brp,FLBRP-methodR Documentation

Fit an FLBRP object

Description

This method carries out the necessary calculation to obtain the reference points for an object of class FLBRP. Results of the calculation are stored in ⁠@refpts⁠ slot of the object, and the object is then returned.

To directly obtain the recalculated refpts slot of an FLBRP object, the computeRefpts method can be used. This is equivalent to fitting the object using brp and then extracting the ⁠@refpts⁠ slot.

The plot method for the FLBRP class will show the relationship between equilibrium SSB, Yield and Profit against levels of fishing mortality and that of recruitment, Yield and profit against SSB.

Usage

## S4 method for signature 'FLBRP'
brp(object)

## S4 method for signature 'FLBRP'
computeRefpts(object)

## S4 method for signature 'FLBRP,missing'
plot(
  x,
  refpts = dimnames(x@refpts)$refpt,
  obs = FALSE,
  labels = TRUE,
  shapes = "missing",
  colours = "missing",
  panels = NULL,
  ncol = 2,
  ...
)

Arguments

object

An object of class FLBRP

x

An object of class FLBRP

refpts

Reference points to include, defaults to all in standard refpts slot bu virgin. A vector of class character

obs

Should observations be plotted? Defaults to FALSE.

Value

An object of class FLBRP with reference points estimated

An object of class ggplot2.

See Also

FLBRP

FLBRP

Examples

data(ple4brp)

ple4brp <- brp(ple4brp)
refpts(ple4brp)
m(ple4brp)[1:3,] <- 0.2
computeRefpts(ple4brp)
data(ple4brp)
plot(ple4brp)
# ADD observations
plot(ple4brp, obs=TRUE)
# SELECT which refpts to plot
plot(ple4brp, refpts=c("msy", "crash", "f0.1"))
plot(ple4brp, refpts=c("msy", "crash", "f0.1"), colours=c("green", "red", "blue"))
plot(ple4brp, refpts=c("msy", "crash", "f0.1"),
  colours=c("green", "red", "blue"), shapes=c(21, 22, 23))
# method will only plot existing referenced points
refpts(ple4brp) <- refpts(ple4brp)[c("msy", "fmax", "spr.30"),]
plot(ple4brp)
# Select which panels to plot
plot(ple4brp, panels=1:4)
# and in which format
plot(ple4brp, panels=1:3, ncol=1)

flr/FLBRP documentation built on April 8, 2024, 3:18 a.m.