Description Usage Arguments Author(s) See Also Examples
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.
1 2 3 4 5 6 7 | plot_status_stacked(year,
status,
xlab = "Year",
ylab = "Percentage of stocks",
mask_last_year = TRUE,
xlim = NULL,
...)
|
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(). |
Sean Anderson
get_froese_etal_2012_status
, plot_status_ts
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.