
Classify numeric depth and velocity values
Source:R/classify-values.R
classify_mesohabitat_values.RdApplies one authoritative rule-table engine. Lower bounds are inclusive, upper bounds are exclusive, missing inputs remain missing, and zero depth and velocity are classified mathematically (Class 1 under the default scheme).
Usage
classify_mesohabitat_values(
depth,
velocity,
scheme = meso_scheme_default(),
dry_threshold = NULL,
invalid = c("error", "NA")
)Arguments
- depth, velocity
Numeric vectors in the units declared by
scheme. Length-one inputs may be deliberately recycled; other unequal lengths fail.- scheme
A validated
meso_scheme.- dry_threshold
NULLto preserve the scheme exactly, or a nonnegative depth at or below which classifications becomeNA.- invalid
Either
"error"(default) or"NA"for negative and infinite observations. Values are never clamped or replaced with zero.
Value
A data frame containing depth, velocity, integer
mesohabitat_class, and unordered factor mesohabitat.
References
Cordero, E. and Harris, A. (Preprint). SSRN. doi:10.2139/ssrn.7100727 .