## ----plot-options, include=FALSE----------------------------------------------
knitr::opts_chunk$set(fig.bg = "white", dev.args = list(bg = "white"))

## ----setup--------------------------------------------------------------------
library(hydromeso)
h <- mesohabitat_example_rasters()
d2 <- h$depth * 1.25
v2 <- h$velocity * 1.15
depth <- list(low = h$depth, high = d2)
velocity <- list(low = h$velocity, high = v2)

## -----------------------------------------------------------------------------
scenarios <- classify_mesohabitat_series(depth, velocity)
summarize_mesohabitat(scenarios)
plot_mesohabitat(scenarios)

## -----------------------------------------------------------------------------
median_result <- mesohabitat_from_median_hydraulics(depth, velocity)
names(median_result)
plot_mesohabitat(median_result$mesohabitat_from_median_hydraulics)

## -----------------------------------------------------------------------------
modal_mesohabitat(scenarios, ties = "NA")
compare_mesohabitat(scenarios[[1]], scenarios[[2]])

