Skip to contents

[Deprecated]

get.incidence() was renamed to as_biadjacency_matrix() to create a more consistent API.

Usage

get.incidence(graph, types = NULL, attr = NULL, names = TRUE, sparse = FALSE)

Arguments

graph

The input graph. The direction of the edges is ignored in directed graphs.

types

An optional vertex type vector to use instead of the type vertex attribute. You must supply this argument if the graph has no type vertex attribute.

attr

[Deprecated] Use weights instead. If supplied, the value is forwarded to weights as a character edge attribute name.

names

Logical scalar, if TRUE and the vertices in the graph are named (i.e. the graph has a vertex attribute called name), then vertex names will be added to the result as row and column names. Otherwise the IDs of the vertices are used as row and column names.

sparse

Logical scalar, if it is TRUE then a sparse matrix is created, you will need the Matrix package for this.

get_biadjacency(), get_edgelist(), vcount(), edges(), get_eids(), ecount()