Apply allometric equations
sol_allometry(data, equation)
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 |
the input data frame, augmented with columns "allometric_property", "allometric_value", "allometric_value_lower", and "allometric_value_upper"
if (FALSE) { 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")) }