plotJack: plotJack

Description Usage Arguments Value Examples

View source: R/biodyn-plots.R

Description

Create a ggplot2 plot based on a jack knifed biodyn and plots time series of biomass and harvest rate. The basic object can then be modified by adding ggpot2 layers.

Usage

1
plotJack(x, y, ncol = 1)

Arguments

x

an object of class biodyn that has been jack knifed, i.e. by providing a jack knifed CPUE series to fit

y

the original biodyn object

ncol

number of colums in plot panel

Value

an ggplot2 object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
#simulate an object with known properties
bd=sim()
bd=window(bd,end=49)

#simulate a proxy for stock abundance
cpue=(stock(bd)[,-dims(bd)$year]+stock(bd)[,-1])/2
cpue=rlnorm(1,log(cpue),.2)

#set parameters
setParams(bd) =cpue
setControl(bd)=params(bd)
control(bd)[3:4,"phase"]=-1

#fit
bd=fit(bd,cpue)

bdJK=fit(bd,jackknife(cpue))
plotJack(bdJK)
bd  =randJack(100,bd)

## End(Not run)

laurieKell/biodyn documentation built on May 20, 2019, 7:58 p.m.