Skip to contents

Extracts the source type string from a cograph_network object's metadata.

Usage

get_source(x)

Arguments

x

A cograph_network object.

Value

A character string indicating the input type (e.g., "matrix", "tna", "igraph", "edgelist"), or "unknown" if not set.

See also

Examples

mat <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), nrow = 3)
net <- as_cograph(mat)
get_source(net)  # "matrix"
#> [1] "matrix"