Create Data Frame of Extrema Information from Hop Neighborhoods
Source:R/gflow_cx.R
create.hop.nbhd.extrema.df.RdExtracts and formats local extrema information from hop-neighborhood results into a data frame.
Usage
create.hop.nbhd.extrema.df(
result,
include_spurious = TRUE,
threshold = NULL,
sort_by_value = FALSE,
vertex_column_name = "vertex",
label_style = c("mM", "minmax"),
reorder = sort_by_value
)Arguments
- result
A list-like object containing hop neighborhood information. Must contain components
lmin_hop_nbhdsandlmax_hop_nbhds. Ifinherits(result, "gflow_cx"), the spurious threshold may be read from an attribute (seethreshold).- include_spurious
Logical scalar. If FALSE, remove extrema with
hop_idx <= threshold.- threshold
Numeric scalar or NULL. If NULL and
resultis agflow_cx, attempts to readattr(result, "hop.idx.threshold")and thenattr(result, "hop_idx_threshold")for backward compatibility. If still NULL, defaults to 2.- sort_by_value
Logical scalar. If TRUE, labels (and optionally rows) are ordered by function value: minima ascending, maxima descending.
- vertex_column_name
Character scalar. Name of the vertex column.
- label_style
Character scalar. Either
"mM"(default; labels m1/M1) or"minmax"(labels min1/max1).- reorder
Logical scalar. If TRUE, reorder rows so minima (ascending value) come first, followed by maxima (descending value). Defaults to
sort_by_value.