as_netobject: Coerce to a netobject

View source: R/vendored.R

as_netobjectR Documentation

Coerce to a netobject

Description

Returns netobjects unchanged; promotes a bare cograph_network.

Usage

as_netobject(x, ...)

Arguments

x

A netobject or cograph_network.

...

Passed to methods.

Value

A c("netobject", "cograph_network") object.

Examples

W <- matrix(c(0, 0.3, -0.2, 0), 2, 2,
            dimnames = list(c("A", "B"), c("A", "B")))
x <- structure(list(weights = W, method = "relative", directed = TRUE),
               class = "cograph_network")
as_netobject(x)

idiographic documentation built on Aug. 4, 2026, 1:07 a.m.