r4cpue: r4cpue a set of functions to assist with CPUE standardization

Description Analytical functions Plotting functions Utility functions

Description

The r4cpue package provides two categories of functions analytical functions that assist with the cpue standardization plotting functions that illustrate the results of the standardizations. In addition there are example data sets

Analytical functions

coef.CEout

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

getmeans

Calculates a set of central tendency measures for nominal CPUE

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.CEout

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


haddonm/r4cpue documentation built on May 11, 2020, 1:31 a.m.