get_input_n | R Documentation |
This function calculates the number of unique tows, samples, and input sample
size based on alternative approaches. The input sample size then is used
within the get_expanded_comps()
and get_raw_comps()
when creating formatted
composition data files for Stock Synthesis.
get_input_n(
dir = NULL,
data,
comp_column_name = "length_cm",
input_n_method = c("stewart_hamel", "tows", "total_samples"),
species_group = c("all", "flatfish", "shelfrock", "sloperock", "thorny", "other"),
printfolder = "forSS3",
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. |
data |
A data frame of composition data created using |
comp_column_name |
The column name to create composition data for. This column can be
is used to determine whether to format the composition data for length or age
compositions by looking for either age (e.g., |
input_n_method |
Determines the default input sample size to add to the composition data for SS3. There are three options: c("stewart_hamel", "tows", "total_samples") where the default is "stewart_hamel". |
species_group |
A string specifying the species group of interest, which
will lead to the use of the correct species-specific value for
the number of unique samples per tow. See the function call for
allowed values, where the default is |
printfolder |
A string that will be appended to |
verbose |
A logical that specifies if you want to print messages and
warnings to the console. The default is |
Chantel R. Wetzel
Stewart, I.J. and O.S. Hamel. 2014. Bootstrapping of sample size for length- or age-composition data used in stock assessment. Canadian Journal of Fishery and Aquatic Science, 71(4): 581–588. 10.1139/cjfas-2013-0289.
## Not run:
bio <- pull_bio(
common_name = "petrale sole",
survey = "NWFSC.Combo"
)
n <- get_input_n(
data = bio,
comp_column_name = "length_cm",
input_sample_size_method = "stewart_hamel",
species_group = "flatfish"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.