gettraject: gettraject extracts the plausible biomass trajectories from...

View source: R/cMSY_funs.R

gettrajectR Documentation

gettraject extracts the plausible biomass trajectories from cMSY

Description

gettraject extracts the final plausible biomass trajectories from the R1 object that is part of the output from a run_cMSY analysis. The R1 object contains the table of biomass trajectories, the identifer of the individual trajectories within each rK pair that succeeded, and the rK pairs that were trialed. The output is a matrix of only the successful biomass trajectories with the associated rK and starting depletion appending to each trajectory. If no projections are wanted then projn should be set to 0

Usage

gettraject(inR1, projn = 0)

Arguments

inR1

the R1 object that is within the list generated by run_cMSY.

projn

the number of extra projection years to allow for in the biomass trajectories placed into the output matrix ready to be filled by the doproject function. Defaults to 0 which leaves out room set up for projections.

Value

a matrix of the accepted biomass trajectories extended by NAs of the length of projn, plus the rK pair and initial depletion that gave rise to the successful biomass trajectory.

Examples

data(invert)
fish <- invert$fish
glb <- invert$glb
reps <- 5000  # one would run at least 20000, preferably more
answer <- run_cMSY(fish,glb,n=reps,sigpR=0.04)
traject <- gettraject(answer$R1,projn=5)
newtraj <- doproject(traject,constC=150)
head(newtraj)
trajdepl <- makedeplet(newtraj)
plotconstC(trajdepl,endyear=2017,constC=150,target=0.40)

haddonm/datalowSA documentation built on Nov. 5, 2023, 6:40 p.m.