Skip to contents

Generates a contingency table showing the relationships between local maxima and minima in a Morse-Smale complex, ordered by marginal frequencies. Also provides a LaTeX caption describing the table contents.

Usage

create.lmin.lmax.contingency.table(MS.res, lmin.labels, lmax.labels)

Arguments

MS.res

List containing Morse-Smale complex results with component MS_cx

lmin.labels

Named character vector of labels for local minima

lmax.labels

Named character vector of labels for local maxima

Value

A list with two components:

contingency_table

Table showing frequencies of local maxima-minima combinations

caption

LaTeX caption describing the contingency table

Details

The function:

  1. Maps critical points to their labels

  2. Creates a contingency table of label combinations

  3. Orders rows and columns by marginal frequencies

  4. Generates an appropriate LaTeX caption

Examples

if (FALSE) { # \dontrun{
result <- create.lmin.lmax.contingency.table(MS.res, lmin.labels, lmax.labels)
print(result$contingency_table)
cat(result$caption)
} # }