The PacFIN.Utilites package provides functions for filtering, summarizing, expanding, and compiling composition data, and writing out the final products: length- age- and age-at-length compositions.
Many of the functions described below write summary output to the console, and several create plots for
visualizing data at various steps in processing. The information written to the console
can be captured using the
sink function to encapsulate your workflow:
... do work ...
The second call closes the file.
There are 15 functions in this package, and they are sensitive to the order in which they
are run. You can see diagram of the workflow you can expect to follow
Workflow, as well as additional notes.
There is a complete runthrough of example data (species: XMPL) available so
that you can experiment with the package. Use
to see how to filter, stratify and expand the data, and create length- age-
||Filters raw PacFIN data|
||Filters for age data|
||Plots commonly viewed raw PacFIN data|
|| Plots the product of
In addition, the
getExpansion_1 function has a "plot" argument to create
plots documenting the expansions it creates. It also writes summary output to the
||For combinining PacFIN and CalCOM data|
||For treating data from seasonal fisheries, such as Petrale.|
||Reduces the values in a data column to an encoded or named subset.|
||creates the values for the sample to tow expansion.|
||computes the expansion values from the tow upwards to a|
There is one manual step in the workflow. After running the expansion functions, data columns Expansion_Factor_1 and Expansion_Factor_2 are available to use in manually setting the Final_Expansion_Factor.
Age data are expanded separately from lengths, after running
WA fish are generally only expanded using Expansion_Factor_2.
Other expansions are the product of Expansion_Factor_1 * Expansion_Factor_2
For age-at-length comps, set Final_Expansion_Factor to 1. Each fish represents only itself.
||uses the Final_Sample_Size and the user-specified stratification to create comps.|
||separates the unsexed fish into males and females|
||formats the composition data for SS3 and writes it to a file.|
You can run these manually to reset the inital values.
|| Run by
|| Run by
||Used to limit the maximum value in a vector.|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.