addDriors: Add Driors

View source: R/addDriors.R

addDriorsR Documentation

Add Driors

Description

Add driors (data and priors) column to ‘stocks’ object.

Usage

addDriors(stocks, priors, same.priors, shape_prior = 2, b_ref_type = "k",
  growth_rate_prior = NA, growth_rate_prior_cv = 0.2, ...)

Arguments

stocks

tibble containing stock, taxa, and data.

priors

data frame containing stock, initial_state, initial_state_cv, terminal_state, and terminal_state_cv.

same.priors

whether to use the same priors for all stocks.

shape_prior

passed to format_driors.

b_ref_type

passed to format_driors.

growth_rate_prior

passed to format_driors.

growth_rate_prior_cv

passed to format_driors.

...

additional arguments passed to format_driors.

Details

If same.priors = TRUE then the priors where stock = All are used for all stocks.

If same.priors = FALSE then the priors are read from stock-specific rows in the priors data frame.

Value

A tibble like stocks but with the additional column driors.

Author(s)

Arni Magnusson.

See Also

format_driors is the underlying function used to construct the driors column.

addEffort adds an effort column to catch data.

SOFIA-package gives an overview of the package.

Examples

## Not run: 
addDriors(stocks, priors, same.priors=TRUE)
addDriors(stocks, priors, same.priors=FALSE)

## End(Not run)


sofia-tsaf/SOFIA documentation built on May 31, 2022, 3:31 a.m.