Learn R Programming

cograph (version 2.0.0)

is_tna_network: Check if Network is TNA-based

Description

Checks whether a cograph_network was created from a tna or group_tna object.

Usage

is_tna_network(x)

Value

Logical: TRUE if the network was created from a TNA object, FALSE otherwise.

Arguments

x

A cograph_network object.

See Also

as_cograph

Examples

Run this code
# Non-TNA network
mat <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), nrow = 3)
net <- as_cograph(mat)
is_tna_network(net)  # FALSE

if (FALSE) { # requireNamespace("tna", quietly = TRUE)
model <- tna::tna(tna::group_regulation)
net_tna <- as_cograph(model)
is_tna_network(net_tna)  # TRUE
}

Run the code above in your browser using DataLab