Learn R Programming

cograph (version 2.0.0)

get_source: Get Source Type from Cograph Network

Description

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

Usage

get_source(x)

Value

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

Arguments

x

A cograph_network object.

See Also

as_cograph, get_meta

Examples

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

Run the code above in your browser using DataLab