getWCGOP_len: getWCGOP_len beta a function to transpose data from the WCGOP...

Description Usage Arguments

View source: R/getWCGOP_len.R

Description

getWCGOP_len beta a function to transpose data from the WCGOP into a usable form for SS. returns a table that can be saved/copied into a stock synthesis file. are in the traditional format as from the Observer program

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
getWCGOP_len(
  lcomps,
  Nsamp = round(runif(13, 113, 554)),
  fleet,
  fleetno = 1,
  lbin_lo = NA,
  lbin_hi = NA,
  lbin_inc = NA,
  month = 1,
  sex = 0,
  part,
  writeTable = F,
  writeloc = getwd()
)

Arguments

lcomps

a data frame of length-comps from the WCGOP program

Nsamp

a vector of # samples. Typically this is N_Unique_trips from the WCGOP data.

fleet

a string or vector of strings matching values from column Gear

fleetno

optional; fill in any number to the "FltSvy" column of the resultant table; defaults to 1

lbin_lo

minimum bin

lbin_hi

maximum bin

lbin_inc

increments of bins

month

optional; fill in a month into the month column of the resultant table

sex

As in SS: # sex codes: 0=combined; 1=use female only; 2=use male only; 3=use both as joint sexxlength distribution

part

# partition codes: (0=combined; 1=discard; 2=retained) will be written to table

writeTable

logical. if T, requires writeloc

writeloc

a filepath to where you want the table saved.


mkapur/kaputils documentation built on Nov. 14, 2021, 3:23 a.m.