Learn R Programming

cograph (version 2.0.0)

verify_with_igraph: Verify Against igraph

Description

Confirms numerical match with igraph's contract_vertices + simplify.

Usage

verify_with_igraph(x, clusters, method = "sum", type = "raw")

verify_igraph(x, clusters, method = "sum", type = "raw")

Value

List with comparison results

Arguments

x

Adjacency matrix

clusters

Cluster specification

method

Aggregation method

type

Normalization type. Defaults to "raw" for igraph compatibility.

Examples

Run this code
if (requireNamespace("igraph", quietly = TRUE)) {
  mat <- matrix(runif(100), 10, 10)
  diag(mat) <- 0
  rownames(mat) <- colnames(mat) <- LETTERS[1:10]
  clusters <- c(1,1,1,2,2,2,3,3,3,3)
  verify_igraph(mat, clusters)
}

Run the code above in your browser using DataLab