get_source: Get Source Type from Cograph Network

View source: R/class-network.R

get_sourceR Documentation

Get Source Type from Cograph Network

Description

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

as_cograph, get_meta

Examples

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

cograph documentation built on April 1, 2026, 1:07 a.m.