ypr.FLIBM | R Documentation |
bla
ypr.FLIBM(
obj = NULL,
ssbfec = 1e+06,
FMs = seq(0, 1, 0.05),
years = dimnames(obj$stock.a)$year,
purgeProb = 0.2,
parallel = TRUE,
no_cores = detectCores() - 1,
clusterType = "PSOCK",
outfile = "output.txt",
seed = 1
)
obj |
FLIBM object. |
ssbfec |
numeric value. Single value describing constant spawning stock
biomass (or fecundity), used in determining recruitment with |
FMs |
numeric vector. Sequence of maximum fishing mortalities to be applied. |
years |
character vector. Years to use in simulation
(from |
purgeProb |
numeric Value between 0 and 1, indicating the frequency that obj$inds are purged of empty rows (passed to 'remove.ids'). |
parallel |
logical. Simulations run in parallel. |
no_cores |
numeric value. Number of cores to use when
|
clusterType |
(Default: 'clusterType = "PSOCK"') |
outfile |
character. Text file name (Default: 'outfile = "output.txt"') which will records the progress of the permutation completions. |
seed |
seed value for random number reproducibility (Default: 1). When seed = NULL, a random seed is used during each FM run. |
data.frame
data(stkMed)
# obj$rec parameters should result in high recruitment for the given
# ssbfec setting (e.g. many thousands of individuals will result in
# smoother ypr pattern)
stkMed$rec$params$rmax <- 1e4
system.time(
resdf <- ypr.FLIBM(obj = stkMed, ssbfec = 1e6, parallel = TRUE,
FMs = seq(0,0.6,len=12), seed = 1)
)
plot(SSB ~ FM, resdf, t = "o")
plot(Catch/Recr ~ FM, resdf, t = "o")
plot(Lopt ~ FM, resdf, t = "o")
# with refptPlot
calcRefpts(resdf, ypr=TRUE, spar=0.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.