plot.Stock: Plot Operating Model Object

Description Usage Arguments Examples

View source: R/OM_Plotting.R

Description

Generate HTML reports with plots of operating model components ("Stock", "Fleet", "Obs", and "Imp"), the historical simulations ("Hist"), or the complete OM ("OM").

The individual component plots of objects of class Stock and Fleet can also be generated by using the generic plot.pars function. See Examples below.

Usage

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
## S3 method for class 'pars'
plot(
  x,
  Object,
  Stock = NULL,
  nsamp = 3,
  nsim = 200,
  nyears = 50,
  proyears = 28,
  output_file = NULL,
  output_dir = getwd(),
  quiet = TRUE,
  tabs = TRUE,
  title = NULL,
  date = NULL,
  plotPars = NULL,
  open = TRUE,
  dev = FALSE,
  ...
)

## S3 method for class 'Stock'
plot(
  x,
  nsamp = 3,
  nsim = 200,
  nyears = 50,
  proyears = 28,
  output_file = NULL,
  output_dir = getwd(),
  quiet = TRUE,
  tabs = TRUE,
  title = NULL,
  date = NULL,
  plotPars = NULL,
  open = TRUE,
  dev = FALSE,
  ...
)

## S3 method for class 'Fleet'
plot(
  x,
  Stock = NULL,
  nsamp = 3,
  nsim = 200,
  nyears = 50,
  proyears = 28,
  output_file = NULL,
  output_dir = getwd(),
  quiet = TRUE,
  tabs = TRUE,
  title = NULL,
  date = NULL,
  plotPars = NULL,
  open = TRUE,
  dev = FALSE,
  ...
)

## S3 method for class 'Obs'
plot(
  x,
  nsamp = 3,
  nsim = 200,
  nyears = 50,
  proyears = 28,
  output_file = NULL,
  output_dir = getwd(),
  quiet = TRUE,
  tabs = TRUE,
  title = NULL,
  date = NULL,
  plotPars = NULL,
  open = TRUE,
  dev = FALSE,
  ...
)

## S3 method for class 'Imp'
plot(
  x,
  nsamp = 3,
  nsim = 200,
  nyears = 50,
  proyears = 28,
  output_file = NULL,
  output_dir = getwd(),
  quiet = TRUE,
  tabs = TRUE,
  title = NULL,
  date = NULL,
  plotPars = NULL,
  open = TRUE,
  dev = FALSE,
  ...
)

## S3 method for class 'Hist'
plot(
  x,
  nsamp = 3,
  nsim = 200,
  nyears = 50,
  proyears = 28,
  output_file = NULL,
  output_dir = getwd(),
  quiet = TRUE,
  tabs = TRUE,
  title = NULL,
  date = NULL,
  plotPars = NULL,
  open = TRUE,
  dev = FALSE,
  ...
)

## S3 method for class 'OM'
plot(
  x,
  nsamp = 3,
  nsim = 200,
  nyears = 50,
  proyears = 28,
  output_file = NULL,
  output_dir = getwd(),
  quiet = TRUE,
  tabs = TRUE,
  title = NULL,
  date = NULL,
  plotPars = NULL,
  open = TRUE,
  dev = FALSE,
  ...
)

Arguments

x

An object of class Stock, Fleet, Obs, Imp, Hist, or OM, OR one of the following character strings for Object of class Stock: "M", "Growth", "Maturity", "Recruitment", "Spatial", or "Depletion" and for Object of class Fleet: "Effort", "Catchability", "MPA", and "Selectivity".

Object

An object of class Stock or Fleet

Stock

An object of class Stock required for Fleet parameters

nsamp

The number of random samples to show in the plot

nsim

The number of simulations (only used for objects not of class OM)

nyears

The number of historical years (only used for objects not of class OM)

proyears

The number of projection years (only used for objects not of class OM)

output_file

Name of the output html file (without file extension)

output_dir

Output directory. Defaults to getwd()

quiet

An option to suppress printing of the pandoc command line

tabs

Include tabs in the HTML file?

title

Optional title for the markdown report

date

Optional date for the markdown report

plotPars

A named list with options for plots:

  • breaks - numeric. Number of breaks in histograms.

  • col - character. Color of histograms.

  • axes - logical. Include axes in histogram?

  • cex.main - numeric. Size of main title in plots.

  • lwd - numeric. Line width for time-series plots.

open

Logical. Open the html file?

dev

Logical. For development use only.

...

Not used

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
## Not run: 
# Plot Stock Object:
Stock <- DLMtool::Albacore
plot(Stock)

# Individual plots:
plot("M", Stock)
plot("Growth", Stock)
plot("Maturity", Stock)
plot("Recruitment", Stock)
plot("Spatial", Stock)
plot("Depletion", Stock)

# Plot Fleet Object
Fleet <- DLMtool::Generic_DecE
plot(Fleet, Stock)

# Individual plots:
plot("Effort", Fleet, Stock)
plot("Catchability", Fleet, Stock)
plot("MPA", Fleet, Stock)
plot("Selectivity", Fleet, Stock)


# Plot Obs Object
Obs <- DLMtool::Imprecise_Unbiased
plot(Obs)

# Plot Imp Object
Imp <- DLMtool::Overages
plot(Imp)


# Plot Hist Object
OM <- DLMtool::testOM 
Hist <- runMSE(OM, Hist=TRUE)
plot(Hist)

# Plot OM Object
plot(OM)

## End(Not run)

DLMtool/DLMtool documentation built on June 20, 2021, 5:20 p.m.