writeTCSAM02_SizeCompsData: Write size composition data to a connection in TCSAM02 input...

View source: R/writeTCSAM02_SizeCompsData.R

writeTCSAM02_SizeCompsDataR Documentation

Write size composition data to a connection in TCSAM02 input format

Description

Function to write size composition data to a connection in TCSAM02 input format.

Usage

writeTCSAM02_SizeCompsData(
  con = stdout(),
  dfrZCs = NULL,
  dfrSSs = NULL,
  cutpts = NULL,
  tail_compression = c(0, 0),
  optFit = c("BY_X", "BY_XM"),
  likeType = c("MULTINOMIAL", "DIRICHLET-MULTINOMIAL"),
  likeWgt = 1,
  unitsIn = c("ONES", "MILLIONS"),
  unitsOut = c("MILLIONS", "ONES")
)

Arguments

con

: connection to use (default=stdout)

dfrZCs

: size comps dataframe to write to connection

dfrSSs

: sample size dataframe corresponding to dfrZCs

cutpts

: vector of cutpoints that were used to create the size comps

tail_compression

: two-element vector of compresssion factors

optFit

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

likeType

: likelihood type ("MULTINOMIAL" or "DIRICHLET-MULTINOMIAL")

likeWgt

: likelihood weight (multiplier)

unitsIn

: input catch units ("ONES" or "MILLIONS")

unitsOut

: output catch units ("MILLIONS" or "ONES)

Details

The input values should be in ONES for abundance or KG for biomass data.

The input dataframes should have the following column names

  • year

  • sex

  • maturity

  • shell condition

  • size (dfrZCs only)

  • value (dfrZCs) or ss (dfrSSs)

Value

Invisibly returns the connection con to allow piping.


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