sol_allometry: Apply allometric equations

View source: R/allometry.R

sol_allometryR Documentation

Apply allometric equations

Description

Apply allometric equations

Usage

sol_allometry(data, equation)

Arguments

data

data.frame: input data

equation

character or sol_equation object: either the identifier of the equation to apply, or the equation object itself. Can be a single element (this equation will be applied to all rows of the data) or with length matching the number of rows of the data

Value

the input data frame, augmented with columns "allometric_property", "allometric_value", "allometric_value_lower", and "allometric_value_upper"

See Also

allometric_equations

Examples

## Not run: 
x <- data.frame(LRL=c(11.3,13.9),species=c("Architeuthis dux"),
  stringsAsFactors=FALSE)
## it doesn't matter what the column names are, but we
## need to set the property types correctly
x$LRL <- sol_set_property(x$LRL,"lower rostral length")

## apply a single equation to all rows
sol_allometry(x,c("342218_ML_Roel2000"))

## apply a different equation to each row
sol_allometry(x,c("342218_ML_Roel2000","342218_ML_Clar1986"))

## End(Not run)

SCAR/solong documentation built on Aug. 5, 2022, 9:04 p.m.