backCalc: Back-calculate length at previous ages from standard data...

View source: R/backCalc.R

backCalcR Documentation

Back-calculate length at previous ages from standard data format.

Description

Back-calculates length at previous ages from a data.frame that was primarily created from combineData and digitizeRadii. One of several back-calculation models, described in bcFuns and Vigliola and Meekan (2009), can be used. Parameter estimates from various models of fish length on structure radius or structure radius on fish length are computed internally and used in the back-calculations. This function is intended to make back-calculation of fish length at previous ages as streamlined as possible.

Usage

backCalc(
  dat,
  lencap,
  BCM,
  inFormat,
  outFormat = inFormat,
  a = NULL,
  L0p = NULL,
  R0p = NULL,
  L0 = NULL,
  R0 = NULL,
  deletePlusGrowth = TRUE,
  digits = getOption("digits")
)

Arguments

dat

A data.frame created with combineData that MUST have at least the length-at-capture appended as a variable. See Details.

lencap

The unquoted name of the length-at-capture variable.

BCM

A single numeric between 1 and 22 or a string that indicates which model to use (based on numbers and names in Vigliola and Meekan (2009)). See Details in bcFuns for the list of available models.

inFormat

The format of the data in dat. The two choices are "long" with one radial measurement per line (and all radial measurements for a fish in separate rows) and "wide" with one fish per line (and all radial measurements in separate variables). Defaults to "long".

outFormat

The format for the returned data.frame. Choices are as described for inFormat. Defaults to be the same as inFormat.

a

The fish length when the structure first forms as used in the Fraser-Lee model (i.e., BCM=1 or BCM="FRALE"). If this is missing then a will be estimated as the intercept from the fish length on structure radius linear regression.

L0p

The length at the “Biological Intercept” point. Only used in the “Biological Intercept” (BCM=3), “Watanabe and Kuroki” (BCM=12), and “Modified Fry” (BCM=14) models.

R0p

The stucture radius at the “Biological Intercept” point. Only used in the “Biological Intercept” (BCM=3), “Watanabe and Kuroki” (BCM=12), and “Modified Fry” (BCM=14) models.

L0

The length at the arbitrarily selected point in the “Fry” (BCM=13) model.

R0

The structure radius at the arbitrarily selected point in the “Fry” (BCM=13) model.

deletePlusGrowth

A logical that indicates whether the radial measurement that corresponds to “plus-growth” on the structure should be deleted (TRUE; Default) or not (FALSE).

digits

Number of digits to which the back-calculated lengths should be rounded. Defaults to the value returned by getOptions("digits"), which is generally 7 digits.

Value

A data.frame similar to dat but with the radial measurements replaced by back-calculated lengths at previous ages.

Examples

## None yet.


RFishBC documentation built on Aug. 29, 2023, 9:06 a.m.

Related to backCalc in RFishBC...