SurveyLFs.fn | R Documentation |
Expands the lengths up to the total stratum area then sums over strata
SurveyLFs.fn(
dir = NULL,
datL,
datTows,
strat.vars = c("Depth_m", "Latitude_dd"),
strat.df = NULL,
lgthBins = 1,
SSout = TRUE,
meanRatioMethod = TRUE,
sex = 3,
NAs2zero = T,
sexRatioUnsexed = NA,
maxSizeUnsexed = NA,
sexRatioStage = 1,
partition = 0,
fleet = "Enter Fleet",
agelow = "Enter",
agehigh = "Enter",
ageErr = "Enter",
nSamps = "Enter Samps",
month = "Enter Month",
printfolder = "forSS",
remove999 = TRUE,
outputStage1 = FALSE,
sum100 = TRUE,
verbose = TRUE
)
dir |
A file path to an existing directory where you would like to
create a folder to store the output from this function. The default is
|
datL |
A data frame of length-composition data returned from
|
datTows |
A data frame of catch data returned from |
strat.vars |
Variables in both |
strat.df |
A data frame that defines the strata and provides the
calculated areas for each strata returned from |
lgthBins |
An integer vector of length bins. |
SSout |
A logical with the default of |
meanRatioMethod |
A logical with the default of |
sex |
(0, 1, 2, 3). The integer will be used to define the sex column
of the returned input for Stock Synthesis and specifies how the
composition are treated with respect to sex. See the Stock Synthesis
manual for more information. In short, 0 is for unsexed, 1 is females, 2
is males, and 3 is males and females where the sex ratio of the samples is
informative to the model. The default is |
NAs2zero |
A logical specifying if |
sexRatioUnsexed |
A numerical value within |
maxSizeUnsexed |
A numerical value specifying the right side of the
following bin |
sexRatioStage |
(1, 2). The stage of the expansion to apply the sex
ratio. The default is |
partition , fleet , agelow , agehigh , ageErr , month |
Each argument requires a single integer value that will be used to set the associated column of the returned input for Stock Synthesis. See the Stock Synthesis manual for more information. |
nSamps |
A named vector of input or effective sample sizes that will be
used to set the effective sample size of the returned input for Stock
Synthesis. A value must be supplied for every year of data in |
printfolder |
A string that will be appended to |
remove999 |
A logical with the default of |
outputStage1 |
A logical specifying if you would like the function to stop after the end of the first stage of the expansion process and return output that is not ready for Stock Synthesis. This can be helpful when wanting output that can be used as input for VAST. |
sum100 |
A logical value specifying whether to rescale the compositions
to sum to 100. The default is |
verbose |
A logical that specifies if you want to print messages and
warnings to the console. The default is |
The original version was written by Allan Hicks 16 March 2009. This function has since been modified by Chantel Wetzel to work with the data warehouse data formatting, add additional options of when to apply the sex ratio, and correct some treatment of unsexed fish weighted by sample size and area.
Allan Hicks (16 March 2009) and Chantel Wetzel (maintainer)
StrataFactors.fn()
SexRatio.fn()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.