# --- Application to real fishery data ---
library(DLMtool)
library(snowfall) # load package for parallel computing
sfInit(parallel=TRUE,cpus=2) # initiate the cluster with two cpus
mydata<-new('DLM_data') # create a new DLM data object and define:
mydata@Year<-2001:2010 # years
mydata@Cat<-matrix((11:20)*10*runif(10,0.5,1.5),nrow=1) # make up some annual catches
mydata@Ind<-matrix(seq(1.1,0.9,length.out=10)*runif(10,0.5,1.5),nrow=1)
mydata@Mort<-0.2 # instantaneous natural mortality rate
mydata@Abun<-1000 # current abundance estimate (biomass)
mydata@FMSY_M<-0.5 # guess of the ratio of FMSY to natural mortality rate
mydata@vbLinf<-200 # maximum length
mydata@vbK<-0.2 # von B growth coefficient k
mydata@LFC<-50 # length at first capture
mydata<-TAC(mydata) # calculate quotas
plot(mydata) # plot them
mydata<-Sense(mydata,'Fratio') # conduct a sensitivity analysis for one of the methods
sfStop()
Run the code above in your browser using DataLab