To follow this tutorial you should have installed the following packages:
You can do so as follows:
install.packages(c("iterators"))
install.packages(c("FLCore"), repos="http://flr-project.org/R")
library(devtools)
install_github("lauriekell/FLCandy")
library(plyr)
library(reshape)
library(randtests)
library(FLCore)
library(FLBRP)
library(FLasher)
library(ggplotFL)
library(FLCandy)
library(mydas)
library(FLife)
data("ple4")
data("ple4brp")
om=fwdWindow(ple4,end=2050,ple4brp)
deviates=rlnoise(100,rec(om)%=%1,0.3,0.7)
om=propagate(om,100)
om.msy=fwd(om,fbar=fbar(om)[,ac(2018:2050)]%=%c(refpts(ple4brp)["msy","harvest"]),sr=ple4brp,residuals=deviates)
om.f01=fwd(om,fbar=fbar(om)[,ac(2018:2050)]%=%c(refpts(ple4brp)["f0.1","harvest"]),sr=ple4brp,residuals=deviates)
om.mey=fwd(om,fbar=fbar(om)[,ac(2018:2050)]%=%c(refpts(ple4brp)["mey","harvest"]),sr=ple4brp,residuals=deviates)
oms=FLStocks("MSY" =om.msy,
"F0.1"=om.f01,
"MEY" =om.mey)
plot(oms)
stats=ldply(oms,function(x) omSmry(x,ple4brp))
head(stats)
.id | iter | year | ssb | stock | rec | catch | catchjuv | fbar | swt | cwt | sage | cage | crash_harvest | virgin_rec | virgin_ssb | msy_harvest | msy_ssb | msy_yield | msy_biomass | rec_hat |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MSY | 1 | 1957 | 342223.2 | 402414.2 | 477074 | 78360.36 | 11791.67 | 0.2416816 | 0.2298036 | 0.2607206 | 3.370112 | 3.796387 | 0.5251667 | 508719.8 | 1738829 | 0.2753625 | 732514.9 | 82011.12 | 831613 | 5.197113 |
MSY | 1 | 1958 | 355374.8 | 421111.4 | 710748 | 88785.20 | 12109.60 | 0.2786560 | 0.2095089 | 0.2465510 | 3.092674 | 3.585479 | 0.5251667 | 508719.8 | 1738829 | 0.2753625 | 732514.9 | 82011.12 | 831613 | 5.197113 |
MSY | 1 | 1959 | 362119.4 | 456662.1 | 874712 | 105186.13 | 20053.53 | 0.3108412 | 0.1941832 | 0.2336876 | 2.848103 | 3.269446 | 0.5251667 | 508719.8 | 1738829 | 0.2753625 | 732514.9 | 82011.12 | 831613 | 5.197113 |
MSY | 1 | 1960 | 380052.2 | 485669.6 | 797702 | 117974.54 | 25053.53 | 0.3244846 | 0.1943812 | 0.2297833 | 2.844621 | 3.144671 | 0.5251667 | 508719.8 | 1738829 | 0.2753625 | 732514.9 | 82011.12 | 831613 | 5.197113 |
MSY | 1 | 1961 | 391385.5 | 499319.2 | 870799 | 119540.66 | 23842.19 | 0.3251898 | 0.1888139 | 0.2210918 | 2.831387 | 3.130246 | 0.5251667 | 508719.8 | 1738829 | 0.2753625 | 732514.9 | 82011.12 | 831613 | 5.197113 |
MSY | 1 | 1962 | 482245.1 | 575609.4 | 615691 | 126290.43 | 21856.52 | 0.3355884 | 0.2306490 | 0.2352572 | 3.049737 | 3.332219 | 0.5251667 | 508719.8 | 1738829 | 0.2753625 | 732514.9 | 82011.12 | 831613 | 5.197113 |
pMetrics=ddply(stats, .(.id), mydas:::smryStat)
pMetrics
.id | safety | blim | plim | ftar | btar | kobe.year | kobe.n | yield | yieldAav | yieldAav2 | yieldAav3 | yieldRnd | ssbRnd | fbRnd |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
F0.1 | 1.02e-05 | 0.4906060 | 0.6489362 | 0.5640401 | 0.2776612 | 2014 | 3600 | 1.898936 | 0.0756037 | 0.1338450 | 0.1788343 | 0 | 0 | 1.2e-05 |
MEY | 1.02e-05 | 0.4158399 | 0.6489362 | 0.7133332 | 0.2776612 | 2014 | 3600 | 2.250383 | 0.0774168 | 0.1390430 | 0.1881190 | 0 | 0 | 9.8e-06 |
MSY | 1.02e-05 | 0.4068393 | 0.6489362 | 0.7133332 | 0.2776612 | 2014 | 300 | 2.290422 | 0.0779797 | 0.1401134 | 0.1897251 | 0 | 0 | 9.8e-06 |
Nam dignissim vulputate ante sit amet mollis. Donec hendrerit eros vel ligula malesuada consectetur. Morbi porta placerat mi, a feugiat ipsum placerat nec. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum at elementum magna, at venenatis augue. Pellentesque mattis, nisi vel lacinia luctus, sem leo faucibus elit, et gravida eros mi ac nisl. Morbi pellentesque molestie placerat. Nullam quis condimentum mauris. Donec vitae accumsan eros. Proin sed tincidunt mauris. Mauris lobortis commodo tellus, et fringilla lorem euismod et. Vestibulum a purus luctus, consequat massa non, bibendum ligula. Nam at lorem nulla. Curabitur non augue consectetur, molestie dolor vel, dignissim mi.
To learn more about this subsection, check the FLPKG.
L. T. Kell, I. Mosqueira, P. Grosjean, J-M. Fromentin, D. Garcia, R. Hillary, E. Jardim, S. Mardle, M. A. Pastoors, J. J. Poos, F. Scott, R. D. Scott; FLR: an open-source framework for the evaluation and development of management strategies. ICES J Mar Sci 2007; 64 (4): 640-646. doi: 10.1093/icesjms/fsm012.
This document is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.