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
# 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,
html = FALSE,
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, orOM, OR one of the following character strings forObjectof classStock: "M", "Growth", "Maturity", "Recruitment", "Spatial", or "Depletion" and forObjectof classFleet: "Effort", "Catchability", "MPA", and "Selectivity".- Object
An object of class
StockorFleet- Stock
An object of class
Stockrequired forFleetparameters- 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.
- html
Logical. Compile to a HTML report (TRUE) or print plots in R console (FALSE)
- open
Logical. Open the html file?
- dev
Logical. For development use only.
- ...
Not used
Examples
if (FALSE) { # \dontrun{
# Plot Stock Object:
Stock <- MSEtool::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 <- MSEtool::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 <- MSEtool::Imprecise_Unbiased
plot(Obs)
# Plot Imp Object
Imp <- MSEtool::Overages
plot(Imp)
# Plot Hist Object
OM <- MSEtool::testOM
Hist <- Simulate(OM)
plot(Hist)
# Plot OM Object
plot(OM)
} # }
