View source: R/writeTCSAM02_AggregateCatchData.R
writeTCSAM02_AggregateCatchData | R Documentation |
Function to write aggregate catch data to a connection in TCSAM02 input format.
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"))
)
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 |
The input dataframe should have the following column names
year
sex
maturity
shell condition
value - value column
cv - cv column
Invisibly returns the connection con
to allow piping.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.