SurveyLFs.fn | R Documentation |
Create expanded length composition data based on the pre-specified strata.
This function is designed to be used with catch pulled using pull_catch()
and
biological data pulled using pull_bio()
. The default output is formatted based
on the formatting required by Stock Synthesis.
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 = "forSS3",
remove999 = TRUE,
outputStage1 = FALSE,
sum100 = TRUE,
verbose = TRUE
)
dir |
Directory where output will be saved. The directory where the file should be saved. If dir = NULL no output will be saved. |
datL |
A data frame of length-composition data returned from
|
datTows |
A data frame of catch data returned from |
strat.vars |
Variables in both data frame that are used to
define the stratas. Default is bottom depth (m) and latitudes (decimal
degrees), i.e., |
strat.df |
A data frame that defines the strata and provides the
calculated areas for each strata returned from |
lgthBins |
Vector of length bins to create length compositions across. Values above or below the minimum or maximum values, respectively, are grouped into the first size or plus group size. |
SSout |
A logical with the default of |
meanRatioMethod |
A logical with the default of |
sex |
Options of (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 females and males. 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 |
Partition to assign the composition data based on the expected format for Stock Synthesis. Partition of 0 indicates that the composition data include all composition data, 1 for discarded composition data, and 2 for retained fish only. Default of 0. |
fleet |
A single integer value. A user input fleet number to assign to the fleet column based on the expected format for Stock Synthesis. Default "Enter Fleet". |
agelow |
Lower age bin for all age composition data based on the expected format for Stock Synthesis. Default value of -1 which translates to the lowest age bin. |
agehigh |
Upper age bin for all age composition data based on the expected format for Stock Synthesis. Default value of -1 which translates to the highest |
ageErr |
Single interget value of ageing error vector to apply to the age data based on Stock Synthesis. Default "Enter". |
nSamps |
Vector of integer sample sizes. A vector of sample sizes for
all years in |
month |
A single integer value between 1-12. A user input fleet number to assign to the month column based on the expected format for Stock Synthesis. See the Stock Synthesis manual for more information. Default "Enter Month". |
printfolder |
A string that will be appended to |
remove999 |
The output object by the function will have the 999 column combined with the first length bin. Default TRUE. |
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 |
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.