Converts various network representations to an igraph object. Supports matrices, igraph objects, network objects, cograph_network, and tna objects.
Arguments
- x
Network input. Can be:
A square numeric matrix (adjacency/weight matrix)
An igraph object (returned as-is or converted if directed differs)
A statnet network object
A cograph_network object
A tna object
- directed
Logical or NULL. If NULL (default), auto-detect from matrix symmetry. Set TRUE to force directed, FALSE to force undirected.
