plotCat: Plot Categories

View source: R/plotCat.R

plotCatR Documentation

Plot Categories

Description

Plot a summary of stock status categories by year: underfished (green), fully fished (yellow), or overfished (red).

Usage

plotCat(dat, method = "cmsy.naive", cats = 4, type = "count")

Arguments

dat

data frame of stock time series, containing columns named bbmsy and ffmsy, as well as method-specific bbmsy.* and ffmsy.*.

method

string indicating which method was used to estimate B/Bmsy and F/Fmsy.

cats

either 3 or 4, indicating whether to plot the stock status based on biomass only (3 categories) or based on biomass and fishing mortality (4 categories).

type

string indicating the type of plot, either "count" or "stock".

Details

The first two columns in dat are treated as 'stock' and 'year', regardless of the actual column names.

The last column names in dat should contain the method name as a suffix. For example, if method = "effEdepP", then this function will look for columns called bbmsy.effEdepP and ffmsy.effEdepP.

The type argument supports legacy synonyms, where "prop" is the same as "count", and "all" is the same as "stock".

Value

A ggplot object.

Author(s)

Rishi Sharma and Arni Magnusson.

See Also

ggplot is the underlying function used to produce the plot.

calcCat calculates stock status categories.

SOFIA-package gives an overview of the package.

Examples

## Not run: 
plotCat(stock.timeseries, method="effEdepP", cats=3, type="count")
plotCat(stock.timeseries, method="effEdepP", cats=3, type="stock")

## End(Not run)


sofia-tsaf/TSAF documentation built on May 31, 2022, 8:20 a.m.