| data_checker | R Documentation |
hellometry()Will fail if any condition not met
data_checker(dats, biomass_type, model)
dats |
Dataframe to be used for estimation |
biomass_type |
"dry"/"wet". Whether the biomass used in inference should
be dry (default) or wet. See |
model |
"lm"/"poisson". What kind of allometric model should be computed.
See |
An error if any check fails.
# Data named the way the package expects
dats <-
data.frame(species = c("sp_a", "sp_b"),
stage = "larva",
abundance = c(2, 5),
size_col = c("3.1", "unknown"),
biomass_col = c(0.4, NA),
biomass_type = "dry")
# Passes quietly
data_checker(dats, biomass_type = "dry", model = "lm")
# Fails on a column that is not named properly
try(data_checker(dats["species"], biomass_type = "dry", model = "lm"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.