plot_raw: Plot surplus production data

Description Usage Arguments Value Examples

View source: R/plot_raw.R

Description

This function prepares a quick plot of the provided surplus production data. The dataframe must contain a column called "stockid" and a column called "year". There must also be a column containing biomass time series and a column containing surplus production time series. If a covariate is provided (optional), points will be colored based on the covariate.

Usage

1
plot_raw(data, b_col, sp_col, cov_col = NULL, n = NULL)

Arguments

data

Data

b_col

Name of column containing biomass time series

sp_col

Name of column containing surplus production time series

cov_col

Name of column containing covariate time series (optional)

n

Number of stocks to plot (defaults to 12 or fewer)

Value

A plot showing the biomass-production relationship for each stock

Examples

1
2
3
4
data <- splink::ram_ne
plot_raw(data, "tb_scaled", "sp_scaled")
plot_raw(data, "tb_scaled", "sp_scaled", "sst_c_scaled")
plot_raw(data, "tb_scaled", "sp_scaled", "sst_c_scaled", n=20)

cfree14/splink documentation built on Dec. 19, 2021, 2:57 p.m.