Create plot with error

plot_error(
  dat,
  x = "year",
  y = "estimate",
  geom = "point",
  group = NULL,
  facet = NULL,
  xlab = "Year",
  ylab = NULL,
  hline = TRUE,
  ...
)

Arguments

dat

Data frame. Filtered data frame from standard output file(s) preformatted for the target label from filter_data

x

String. Column name of data used to plot on the x-axis

Default: "year"

y

String. Column name of data used to plot on the y-axis

Default: "estimate"

geom

String. Type of geom to use for plotting found in ggplot2 (e.g. "point", "line", etc.).

Default: "line"

Options: "point" and "area"

group

String. Single column that groups the data. Currently can only have one level of grouping.

Default: NULL Options: Including, but not limited to: "year", "area", "fleet", "sex", "none", NULL

facet

Character vector. Column name or names used for faceting (e.g. "year", "area", etc.)

Default: NULL

xlab

String. X-axis label

Default: "Year"

ylab

String. Y-axis label. If NULL, it will be set to the name of `y`.

Default: NULL

hline

Logical. TRUE/FALSE; indicate whether to place a horizontal line at 1

Default: `TRUE`

...

Inherited arguments from internal functions from ggplot2::geom_xx

Value

Create a plot with error for a stock assessment report.

Details

The user can create a line, point, or area plot, where the x-axis is year and y can vary for any time series quantity. Currently, grouping is restricted to one group where faceting can be any number of facets.