Skip to contents

Changes a specific basin label throughout a gradient flow object, ensuring consistency across extrema table, basins, cells, and trajectories.

Usage

replace.basin.label(flow, old.label, new.label)

Arguments

flow

An object of class "ggflow".

old.label

Character string specifying the label to be replaced.

new.label

Character string specifying the new label.

Value

A modified gradient flow object with the updated label.

Details

This function is useful for customizing basin labels after computation, for example, to use more meaningful names based on domain knowledge.

Examples

if (FALSE) { # \dontrun{
# Replace a generic label with a meaningful one
flow_updated <- replace.basin.label(flow, "M1", "HighState")
} # }