rforcpue: rforcpue a set of functions to assist with CPUE...

rforcpueR Documentation

rforcpue a set of functions to assist with CPUE standardization

Description

The rforcpue package provides numerous functions to assist with the standardization of fisheries CPUE data. There are three types of functions 1) analytical functions that assist with cpue standardizations, 2) plotting functions that can be used to illustrate the results of the standardizations, and 3) utility functions that assist with data manipulations, and other activities that occur when conducting standardizations.

Analytical functions

coef.outce

S3 function applied to the output of standLM

dosingle

conducts a standardization of indat using the inmodel, that can be generated using makeonemodel

geomean

Calculates the bias corrected geometric mean

makecategorical

converts a series of variables in a data.frame into factors

makemodels

Given a list of factors this generates a list of formula for inclusion in glm or standLM

makeonemodel

generates a single model for use in dosingle

scaleCE

Rescales a vector of CPUE to a mean of 1.0 or of avCE

standLM

Uses lm to standardize log-transformed CPUE

summary.outce

an S3 function to summarize a standardization output

Plotting functions

addnorm

fits a normal distribution curve to a given histogram

diagnosticPlot

plots some diagnostic details for a standardization

impactplot

Plots the influence of each factor

inthist

a replacement for the hist function for use with integers

plotdata

plots graphs of untransformed and log-transformed data

plotprep

defines a base graphics window for use in RStudio

plotstand

Plots the optimum model vs the year-only model

plotstandFY

The same as plotstand but for Fishing year species

yearBubble

Generates a bubbleplot of x against Year

Utility functions

addcount

adds a new column to input data.frame that is a count of the number of years in which the identified variable, default 'Vessel' occurs each year for each level of the factor

fishery

generates vectors of year, catch, effort, and cpue

getfact

extracts a given factor from the analysis with its standard errors and rescaled to a mean of 1.0

getStand

extracts the main year paramters from a standLM object with its StErr and confidence itervals

properties

Checks a data.frame for NAs and counts; used for QC

removeEmpty

removes empty strings from a vector of strings

selectdata

simplifies the selection of data from a data.frame by depth, years, zones, method, and fishery

toExcel

copys the selected vector or matrix to the clipboard it can be pasted directly into Excel or other software

yearNA

counts the NAs in each numeric field in a data.frame

yearZero

counts the zeros and NAs in identified fields in a df

Author(s)

Maintainer: Malcolm Haddon malcolm.haddon@gmail.com (ORCID)


haddonm/rforcpue documentation built on Oct. 12, 2024, 11:55 p.m.