plot_status_stacked: Plot the status of fisheries through time using the typical...

Description Usage Arguments Author(s) See Also Examples

Description

Takes the status of a group of fisheries through time and plots them in a stacked polygon layout. Data can be pre-aggregated by year or in long format (e.g. a column for stock ID, a column for year, and a column for status). The function will aggregate by year.

Usage

1
2
3
4
5
6
7
plot_status_stacked(year,
status,
xlab = "Year",
ylab = "Percentage of stocks",
mask_last_year = TRUE,
xlim = NULL,
...)

Arguments

year

The years to plot.

status

The status. Should be a factor with levels of 1:6 representing: "Undeveloped", "Developing", "Rebuilding", "Fully exploited", "Overexploited", and "Collapsed", in that order.

xlab

The x-axis label.

ylab

The y-axis label.

mask_last_year

Should the last year be plotted?

xlim

The x-axis limits. Defaults to the range of years given.

...

Other parameter values to pass to plot.default().

Author(s)

Sean Anderson

See Also

get_froese_etal_2012_status, plot_status_ts

Examples

1
2
3
4
data(srdb)
library(plyr)
out <- ddply(srdb, "assessid", transform, status = get_froese_etal_2012_status(catch)$status)
with(out, plot_status_stacked(tsyear, status))

seananderson/catchstatus documentation built on May 29, 2019, 4:25 p.m.