length_con: Function to convert between various fish length measurements

View source: R/utils.R

length_conR Documentation

Function to convert between various fish length measurements

Description

The function uses various fish length measurement relationships to convert from an available measurement into a desired measurement. For example, if only standard length after ethanol preservation (sle) was recorded, but fresh fork length measurement (flf) is desired, then flf can be calculated using the relationship between sle and flf from fish which had both measurements taken.

Usage

length_con(from, to, length)

Arguments

from

The measured length type.

to

The desired calculated length type.

length

The length or lengths to be converted.

Value

from

Must be one of flf, fle, slf, sle, flfrz, slfrz, tlfrz, and tlf are supported (tle, total length ethanol, is not a supported input measurement). If not one of these, will return an error message.

to

Must be one of flf, slf, and tlf are supported. If not, will return an error message.

length

A single value or vector of numeric values. Conversion functions were created using fish >40mm. If a length is smaller than that, a warning will be produced.

length types:

The first two letters refer to the length type: sl = standard length, fl = fork length, and tl = total length. The rest of the letters refer to preservative type: f = fresh/live, e = ethanol, frz = frozen. Formalin is not currently a supported preservative type.

Author(s)

Arthur Barros Christian Denney

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.



ctdenney/OGFLtools documentation built on Feb. 8, 2023, 5:47 p.m.