writeTCSAM02_AggregateCatchData: Write aggregate catch data to a connection in TCSAM02 input...

View source: R/writeTCSAM02_AggregateCatchData.R

writeTCSAM02_AggregateCatchDataR Documentation

Write aggregate catch data to a connection in TCSAM02 input format

Description

Function to write aggregate catch data to a connection in TCSAM02 input format.

Usage

writeTCSAM02_AggregateCatchData(
  con = stdout(),
  dfr = NULL,
  type = c("ABUNDANCE", "BIOMASS"),
  optFit = c("BY_X", "BY_XM"),
  likeType = c("NORM2", "NORMAL", "LOGNORMAL"),
  likeWgt = 1,
  unitsIn = ifelse(toupper(type) == "ABUNDANCE", c("ONES", "MILLIONS"), c("KG",
    "THOUSANDS_MT", "MILLIONS_LBS", "MT", "LBS")),
  unitsOut = ifelse(toupper(type) == "ABUNDANCE", c("MILLIONS", "ONES"),
    c("THOUSANDS_MT", "MILLIONS_LBS", "MT", "KG", "LBS"))
)

Arguments

con

: connection to use (default=stdout)

dfr

: aggregate catch dataframe to write to connection

type

: catch type ("ABUNDANCE" or "BIOMASS")

optFit

: objective function fitting option (e.g., "BY_X","BY_XM")

likeType

: likelihood type

likeWgt

: likelihood weight (multiplier)

unitsIn

: input catch units

unitsOut

: output catch units

Details

The input dataframe should have the following column names

  • year

  • sex

  • maturity

  • shell condition

  • value - value column

  • cv - cv column

Value

Invisibly returns the connection con to allow piping.


wStockhausen/tcsamFunctions documentation built on Jan. 28, 2024, 9:01 a.m.