getExpansion_1: First level expansion for composition data to accout for...

Description Usage Arguments Details Value Expansion caveats

View source: R/getExpansion_1.R

Description

Workflow

getExpansion_1 is run after cleanPacFIN and cleanAges.

Usage

1
2
3
getExpansion_1(Pdata, maxExp = 0.95, Indiv_Wgts = TRUE, Exp_WA = TRUE,
  fa = NA, fb = NA, ma = NA, mb = NA, ua = NA, ub = NA,
  verbose = TRUE, plot = FALSE)

Arguments

Pdata

A PacFIN data.frame

maxExp

The maximum expansion factor (either a number or a quantile).

Indiv_Wgts

A logical value, controlling whether or not individual fish weights should be generated using the specified weight-length relationship.

Exp_WA

Default FALSE. If TRUE, expand the WA samples.

fa

Female specific weight length coefficient.

fb

Female specific weight length exponent.

ma

Male specific weight length coefficient.

mb

Male specific weight length exponent.

ua

Unsexed weight length coefficient.

ub

Unsexed weight length exponent.

verbose

A logical value specifying if output should be written to the screen or not. Good for testing and exploring your data but can be turned off when output indicates errors. The default value is TRUE.

plot

Argument takes either a logical or character value specifying the file name if you want to write the plots to a disk rather than printing them to the console. If plot = FALSE no plots will be generated. If printing to the disk the character value should end in .png as png() is used to save the plotting device.

Details

getExpansion_1 calls EF1_Numerator and EF1_Denominator (i.e., the weight of sampled fish and the weight of all fish of the respective species in the tow) and returns their ratio.

Value

A data.frame where all of the original columns in Pdata remain unaltered but additional columns are added.

Expansion caveats

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.


nwfsc-assess/PacFIN.Utilities documentation built on June 30, 2017, 8:49 a.m.