summary.mst_completion_graph: Summary Method for MST Completion Graph Objects

View source: R/mst_completion_graphs.R

summary.mst_completion_graphR Documentation

Summary Method for MST Completion Graph Objects

Description

Computes and returns a comprehensive summary of an MST completion graph, including graph statistics, edge weight distributions, and PCA information if applicable.

Usage

## S3 method for class 'mst_completion_graph'
summary(object, ...)

Arguments

object

An object of class mst_completion_graph.

...

Additional arguments (currently ignored).

Value

An object of class summary.mst_completion_graph containing:

n_vertices

Number of vertices in the graph

n_mst_edges

Number of edges in the minimal spanning tree

n_cmst_edges

Number of edges in the completed graph

q_thld

Quantile threshold used for completion

edge_weight_summary

Five-number summary of MST edge weights

completion_threshold

The actual distance threshold used

pca_applied

Logical indicating if PCA was applied

pca_info

PCA details (if applicable)

See Also

print.summary.mst_completion_graph for printing summaries, create.cmst.graph for creating graphs

Examples

graph <- list(
  mst_adj_list = list(c(2L), c(1L, 3L), c(2L)),
  mst_weight_list = list(1.1, c(1.1, 0.9), 0.9),
  cmst_adj_list = list(c(2L, 3L), c(1L, 3L), c(1L, 2L)),
  cmst_weight_list = list(c(1.1, 1.4), c(1.1, 0.9), c(1.4, 0.9)),
  mst_edge_weights = c(1.1, 0.9),
  cmst_distance_threshold = 1.08
)
attr(graph, "q_thld") <- 0.8
attr(graph, "cmst_distance_threshold") <- graph$cmst_distance_threshold
class(graph) <- c("mst_completion_graph", "list")

summary(graph)


dgraphs documentation built on Aug. 21, 2026, 1:08 a.m.