metric_colors: Metric colors

View source: R/metric_colors.R

metric_colorsR Documentation

Metric colors

Description

Returns a vector of colors based on the number of threshold breaks in the input 'FluvialGeomorphicMetric“ object.

Usage

metric_colors(metric)

Arguments

metric

MetricThreshold object; the fluvial geomorphic metric to be mapped

Value

a vector of colors

Examples

# Define metric objects
wdr3 <- new(Class = "FluvialGeomorphicMetric",
           metric = "Width Depth Ratio",
           definition = "bankfull width / bankfull depth",
           variable = "xs_width_depth_ratio",
           threshold_breaks = c(0, 10, 20, Inf),
           threshold_labels = c("Incised",
                                "Stable",
                                "Overwidened"),
           source = "Dunn & Leopold, 1978")

# Get a set of colors for a `FluvialGeomorphicMetric` object
cols <- metric_colors(wdr3)


FluvialGeomorph/fluvgeo documentation built on April 12, 2024, 5:35 p.m.